magayuma278
magayuma278 magayuma278
  • 17-01-2022
  • Computers and Technology
contestada

Use a for loop to output all multiples of 10 , starting at 10 and going to and including 1000?
This is python
Pls help!!

Respuesta :

TheOnlyLman3613
TheOnlyLman3613 TheOnlyLman3613
  • 17-01-2022

Answer:

def main():

 for i in range(10,1010,10):

   print(str(i))

main()

Explanation:

def main(): # Creates main function

 for i in range(10,1010,10): # is an iteration that starts at 10, ends at 1010 and skips 10 numbers per iteration

   print(str(i)) # Outputs each multiple of 10

main() # Calls the main function

Hope this helps :)

Answer Link

Otras preguntas

Regular exercise can NOT prevent, delay, or reduce __________. A. diabetes B. arthritis C. skin cancer D. heart disease
During the Golden Age, Al-Khwarizmi was known for inventing
To determine waves frequency you must know the what
Inferred meaning is one that is suggested rather then directly stated. True False
What is one essential element of historical fiction?
how do u write 5.6 as a fraction in simplest form
in terms of migration which of the following is an example of a pull factor
What is 310 763 and 136 in word form
write words to match the expression 36 ÷ 4
round 6,289,002 to the nearest 1,000,000