Pattern problem

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?

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 .