Write a program to print the following pattern using for loop:
? ? ? ? ? ?
? ? ? ? ?
? ? ? ?
? ? ?
? ?
?
# taking value to print pattern
n = int(input("Enter the value:"))
# take values in reverse manner and print for each value
for i in reversed(range(1,n)):
print(i*'?')
Comments
Leave a comment