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

Writers try to let us know what is important in their writing. When we see words such as: "so", "because", "since", or "thus" the author is letting us know that
Hi can you help me with this?​
the width of a rectangle is half its length. the perimeter is 36 inches. whar are the dimensions of the rectangle
What process forms an image in a mirror? Choices: A. absorbing light B. Reflecting light C. Refracting light D. Transmitting light
how do you solve this math problem what is the answer $1.79$0.16+$19.90..................​
If a consistent system has an infinite number of solutions it said to be
I WILL MARK BRAINLIEST Look at picture and answer question
An astronaut from the ____ was the first human to travel to space
What is the area of the composite figure?
The Picture has the answers and the question.