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 times what equals to 810
c *c-5c-24=0 Solve this quadratic equation by graphing.. But first how do you find the ordinates
Explain how you can use mental math to compare 7 pounds to 120 ounces.
what is a person called when they move place to place
How did the integrated circuit effect the development of computers? It allowed computers to be freely programmed. It allowed the use of totally electronic compu
Which value of x makes the expression undefined 2x-32-x
What is a slogan for sulfur that rhymes
which rain forest is located mostly on islands
Why does Don Quixote ride off bravely to fight windmills? A. He thinks his lady is imprisoned in one of the windmills B. He believes that Freston has taken t
A Rectangle Measures 11Cm By 30 Cm. What is its area?