Answer to Question #196883 in Python for Shawn

Question #196883

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

? ? ? ? ? ?

? ? ? ? ?

? ? ? ?

? ? ?

? ?

?


1
Expert's answer
2021-05-23T08:49:36-0400
# 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*'?')

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS