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.

Expert's answer

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






LATEST TUTORIALS
APPROVED BY CLIENTS