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

15 points! Simplify. (4^3)^5 A) 4^-2 B) 4^3 C) 4^8 D) 4^15
as straight as an arrow is an example of what?
.003 is 1/10 of what
the unit rate 2.50 for 5 ounces
what is the value of the digit 1 in the number 0.413
How can I solve h-17=-12
what are the two whole numbers closest to square root of 95
0.08 is 10 times as great as
Which sentence uses periods correctly? A. A U.S. soldier marched down N. Maple Blvd. in the parade. B. A U.S. soldier marched down N Maple Blvd in the parade
what is 1/10 of 60000