My code runs well in Jupyter Notebook, but throws an error while submitting the code on the Coding Blocks platform!
Here’s the code:
n = int(input())
for i in range(1, n+1):
for j in range(1, n+2-i):
print(j, end=" ")
for j in range(1, (2*(i-1))+1):
print("*", end=" ")
print("\n")