33.WAP to display following pattern
CODE:
n=int(input("How many rows\n"))
for i in range(n+1,0,-1):
for j in range(i,0,-1):
print("*",end=" ")
print()
OUTPUT:
How many rows
5
* * * * *
* * * *
* * *
* *
*
CODE:
n=int(input("How many rows\n"))
for i in range(n+1,0,-1):
for j in range(i,0,-1):
print("*",end=" ")
print()
OUTPUT:
How many rows
5
* * * * *
* * * *
* * *
* *
*
Comments
Post a Comment