Answer to Question #155052 in Python for Courtney T Bernard

Question #155052

Write a program that uses a while loop to calculate and print the multiples of 3 from 3 to 21. Your program should print each number on a separate line.

1
Expert's answer
2021-01-12T08:03:56-0500
first_element=3 

multiple_step=3     

last_element=21       

intermediate_element=3       

while intermediate_element <= 21 :

   print(intermediate_element)

   intermediate_element=intermediate_element+multiple_step

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