Question #196883

Write a program to print the following pattern using for loop:

? ? ? ? ? ?

? ? ? ? ?

? ? ? ?

? ? ?

? ?

?


Expert's answer

# 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*'?')
LATEST TUTORIALS
APPROVED BY CLIENTS