Answer to Question #229960 in Python for Assignment

Question #229960
Write a code to print multiples of 3 or 7 from 1 to 100 using while loops.
1
Expert's answer
2021-08-28T08:58:36-0400
number = 1
print("Multiples of 3 between 1 and 100")
while number < 100:
    if number % 3  == 0:
        print(number)
    number += 1
print("Multiples of 7 between 1 and 100")
count  = 1
while count < 100:
    if count % 7 == 0:
        print(count)
    count += 1

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