magayuma278
magayuma278 magayuma278
  • 17-01-2022
  • Computers and Technology
contestada

Use a for loop to output every third number from 0 to 51? This is python

Respuesta :

TheOnlyLman3613
TheOnlyLman3613 TheOnlyLman3613
  • 17-01-2022

Answer:

def main():

 for i in range(3,52,3):

   print(str(i))

main()

Explanation:

def main(): # Creates main function

 for i in range(3,52,3): # is an iteration that starts at 3, ends at 51 and skips 3 numbers per iteration

   print(str(i)) # Outputs each 3rd integer

main() # Calls the main function

Answer Link

Otras preguntas

why is Nepal constitution called the constitution of Federal Democratic Republic explain​
How would you describe “Donate Clothes” community service?
Capitalists believe all of the following are true except with one? A. Capital should be invested B laws restrict profits C. Excessive wealth is wrong D free
what is 5 times 5 help 9 grade
does anyone know this??
help needed TIMED Will give brainlliest
Which of the following is NOT an example of a convergent boundary? A. continental crust to continental crust collision B. mantle to core collision C. continenta
gining right answer bralest
Which of the following statements statements expresses the following chemical equation with words?2 K(s) + Cl2(g) ---> 2 KCl(s)Select one:a. Four atoms of kr
There is a closed carton of eggs in Mai's refrigerator. The carton contains e eggs and it can hold 12 eggs. What does the inequality e < 12 mean in this cont