ktie7488 ktie7488
  • 01-01-2021
  • Computers and Technology
contestada

Write a while loop that prints user_num divided by 2 until user_num is less than 1. The value of user_num changes inside of the loop. Sample output for the given program:

Respuesta :

Cytokine
Cytokine Cytokine
  • 01-01-2021

user_num = 20

while user_num>= 1:

   print(user_num,"divided by 2 =",user_num/2)

   user_num /= 2

I wrote my code in python 3.8. I hope this helps.

Answer Link

Otras preguntas

What are some reasons why Immigrats people come to the U.S.?
why did  the volcano explode
1,352 pounds is what fraction short of a ton? A) 169/250             B) 77/100               C)13/20             D140/223
what It Trigonometry ?
Which of the following molecules has polar bonds but is a nonpolar molecule? a. H₂ b. H₂O c. NH₃ d. NaCl e. CO₂ Can anyone explain this one?
A ski jumper competing for an Olympic gold medal wants to jump a horizontal distance of 135 meters. The takeoff point of the ski jump is at a height of 25 meter
after clicking the start button on your computer screen desktop what option would you then select to examine system components you might want to modify?
solve for x: 2x^2+4x-16+=0
What are some reasons why Immigrats people come to the U.S.?
What is the value of x in 15x-10= 20