lisbethv0225 lisbethv0225
  • 08-12-2020
  • Computers and Technology
contestada

Write a program where you print this sequence.

1

3

5

7

9

Respuesta :

Cytokine
Cytokine Cytokine
  • 08-12-2020

init = 1

choice = int(input("How far into the sequence would you like to go to? "))

i = 0

while i < choice:

   print(init)

   init += 2

   i += 1

If you enter 5, you'll get 1,3,5,7,9. You can also go to whatever place in the sequence you want. I wrote my code in python 3.8. Hope this helps

Answer Link

Otras preguntas

I have to write an essay comparing and contrasting Pygmalion and My Fair Lady. I need help, i don't know how to start it. Could someone give me some tips?
Which statement best describes the religious beliefs and practices of prehistoric peoples?
if a standard basketball court is 50 feet by 94 feet. what is the total surface area in square feet
multiply k+3/4k-2 * (12k^2 -3)
Each employee has a responsibility to be sure the food prepared, cooked or served is safe. An employee should notify the manager immediately if a swollen can is
What would it mean if there was an outbreak of cholera
I prefer to work on familiar work tasks
Explain the differences between Wilson’s Fourteen Points and the Treaty of Versailles?
Nutrients and toxins are removed from the blood by the
Many English speakers mix up ‘who’ and ‘whom’. Do you know which of these sentences is incorrect? A. I have two brothers, one of whom is a scientist. B. With w