Answer to Question #196886 in Python for Shawn

Question #196886

Write a program to print the following pattern using for loop: (2 marks)

? ? ? ? ? ?

? ? ? ? ?

? ? ? ?

? ? ?

? ?

?


1
Expert's answer
2021-05-23T08:49:41-0400
Num = 6
for r in range(0,Num):
    s=""
    for c in range(0,Num-r):
        s = s+ "? "
    print(s)

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