0
Why I am unable to print Right triangle using "*"?
""" Print * in hallow right triangle shape * * * * * * * * * * * * """ n=int(input("Enter the no. of rows : ")) for row in range(0,n): for col in range(0,n): if row==0 or col==(n-1) or row==col: print("*", end=" ") else: print(end=" ") print() """When I am running this code it will not printing the right triangle correctly. First 5 star printed first after the input value taking in same line and then rest of the stars printed from second line. This issue happened in only Solo Learn App """
2 ответов
+ 1
else:
print(end=" ") # Double space