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

Someone please help me with this question please I will appreciate it a lot
Rose's stamp collection is 7 less than half of Van's stamp collection, x. Which expression represents the total number of stamps that Rose has?
_____ was the first black person in any field to earn a ph.d from harvard. robert park ida b. wells-barnett w.e.b. du bois jane addams
A company plans to manufacture a container having the shape of a right circular cylinder, open at the top, and having a capacity of 24 π cubic inches. If the co
What is the purpose of main() in java?
The Supreme Court case Tinker v. Des Moines School District dealt with
What does s equal 8s-(8+6s)=20
Homeostasis is associated with the relative constancy of the physcial and ___________ environment in the cells of an organism and in the organism itself.
X, y, and z are consecutive integers, and x < y < z. what is the average of x, y, and z? (1) x = 11 (2) the average of y and z is 12.5.
What do you want me to say? spam How many times do you want me to say it? 5 spamspamspamspamspam