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

y-3x=2 y=-2x-8 how do i solve this by substitution
What is new england colonies?
Unlike its predecessor, World War II featured large scale civilian casualties. Which of these BEST explains why this was the case? A. Aircraft were used on a la
which graph represents a quadratic function with a negative discriminate
Where does Robinson Crusoe end up after he jumps off the ship during the storm? A. on a beach B. on the rocks C. on a pile of driftwood D. on a sandbar
What was an important concern for the Founding Fathers when drafting the Articles of Confederation? a: avoiding tyranny of a powerful central government b: gran
a geometric series has 3 terms. the sum of the three terms is 42. the third term is 3.2 times the sum of the other two terms. what are the three terms?
what type of system is the following set of equations? {-3x + y = -2 y - 4 = -6x a. consistent, independent b. consistent, dependent c. inconsistent d. indep
Large streams of surface seawater are called ___________. ocean currents prevailing winds fronts all of the above
what is a two way table