Answer to Question #99194 in Python for joe

Question #99194
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
2019-11-22T07:06:30-0500

start_el=3       #the starting element

step=3          # multiples of 3 

last_el=21       #the last element

interm_v=3       #ithe intermediate element


while interm_v <= 21 :

   print(interm_v)

  interm_v=interm_v+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