Answer to Question #324946 in Python for Shahen

Question #324946
Write a program to display the first 7 multiples of 7 using both(for, while) loops
1
Expert's answer
2022-04-06T13:54:29-0400
print('First 7 multiples of 7')


print('for loop:', end=' ')
for i in range(1,8):
    n = 7*i
    print(n, end=' ')
print()


print('while loop:', end=' ')
i = 1
while i < 8:
    n = i*7
    print(n, end=' ')
    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