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

What is ten times two?
How do you test pH levels in bottled water?
fill in the blank ____________________ is the closeness of a measurement to the actual value being measured.
Compare and contrast the characters, the setting, and the events of the story so far. what story element seems to be mainly driving the story?
Through what country do the Tigris and Euphrates rivers flow
What are the stages of meiosis and describe them.
What are the addictve qualities inherent in marijuana?
Which is not equivalent 3/8 1/4 9/24?
If there are 0.064g of theobromine in a 43g chocolate bar, how many moles of theobromine are there?
1. Fill-in the blank with the appropriate form of the verb in the imparfait.J' ______ petit en 1993. (être) Il _______ deux ans quand je suis venu en Amérique.