N = int(input(βEnter value of Nβ))
for i in range(1,N+1):
m = 1
for j in range(1,N+N):
if j <= N+1-i:
print(m,end=" β)
m += 1
elif j<=N+i-2:
print(β*",end=" β)
else:
print(β β,end=β")
print()
why ur compiler is showing that all test cases are failed but it is working fine in my compiler?
Pattern problem
Does i need to run this pattern for negative no.s?
The issue is that you are also printing the statement - βEnter value of Nβ .
You donβt have to print it , you only need to print the star pattern .
In such questions you donβt have to print any additional statement , simply print the output only .