Answer to Question #241045 in Python for saksham

Question #241045
Alternate numbers pattern using while loop write a python program how to use the while loop to print the number pattern.
1
Expert's answer
2021-09-24T13:26:29-0400
rows = 10
i = 1
while i <= rows:
    j = 1
    while j <= i:
        print((i * 2 - 1), end=" ")
        j = j + 1
    i = i + 1
    print('')

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