Pattern Numbers & Stars - 1

i dont know how it will work
n=int(input())
for x in range(n,0,-1):
for y in range(1,n+1):
if y>x:
print("* β€œ*2,end=” β€œ)
else:
print(y,end=” ")
print()

but the problem is its not showing the excet star pattern ?

hey @tavinash391 ,
check this

n=int(input())

for x in range(n,0,-1):

print(list(range(1,x+1)),end=’ ')
print((2
(n-x)-1)*" *", end=’’)
print()

1 Like

still not working :frowning_face:

is there any error you are getting?

main.py:6: SyntaxWarning: β€˜int’ object is not callable; perhaps you missed a comma?
print((2(n-x)-1)*" *", end="")

its 2* ( multiplication sign )

add that

5
[1, 2, 3, 4, 5] [1, 2, 3, 4] *[1, 2, 3] * * *[1, 2] * * * * *[1] * * * * * * *
ξΊ§
its giving this output???

hey @tavinash391 ,
check this

1 Like

thankgod now its working thank you so much brother 5 star

Great !!!

I request you to kindly mark this doubt as resolved.

1 Like

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.