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 was the name of the German government in southern France?
Pure water has a pH level of a around what number?
what is a good sentence that includes the word afterglow?
What term might loyalist have used to describe a patriot gathering or committee?
What is iambic pentameter? a) lines of poetry with a rhyme scheme of ABABABABAB b) poetry that uses precise imagery and an irregular meter c) poetry written in
What would most likely have happened to the first finch with the big beak if it had been born on the continent of South America? A. It would not have had any fi
A girl walks 5000 meters in 1 hour if the girl walks the same speed for 4 hours how many kilometers would you have walked
Graph the equation. y-4=1/4(x-1)²
Deanna bought the poster shown below for her wall. Note: Figure not drawn to scale If a = 12 cm, b = 29 cm, c = 15 cm, and d = 19 cm, what is the area of the po
What is the sweet substance made by bees?