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 do we dream? Please help; it's psychology.
__________ factors, such as the purchase situation, often override or influence psychological and social issues influencing consumers' purchase decisions.
"One-eighth of the whole population were colored slaves, not distributed generally over the Union, but localized in the southern part of it. These slaves consti
if a=3/2 and b=3/4 which of the following has the great value? a. ab b. a/b c. b/a d. (ab)2
according to alfred w. crosby,what was one effect of spanish colonization on the island of espanola?
The difference between isotopes for the same element will be found in the atoms' a. number of protons. b. number of electrons. c. number of neutrons. d. cha
I am trying to find X and Y
Why did James Meredith attend to University of Mississippi
What is Economy? In your own words pls
Radio telescopes cannot be used with an overcast, cloudy sky. true or false