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 can the reader infer about walter and ruth's relationship?
A circle has a sector of 64/5pi and it has a angle of 8/5pi radians, what is the area of the circle?
How many 1/5 cup are in 5 cups
What is an equation in slope-intercept form????
Families of functions
Anybody know a good website to find thats good for english
Why are the gases in the troposphere layer denser than the gases in the other layers?
Caitlin had $402 in her bank account. She withdrew $15 each week to pay for swimming lesson. She now has $237. Write an equation that can be used to find the nu
As the movement of molecules within a substance increases, describe the change in heat of the substance.
Four molecules each consist of a central atom with other atoms around it in each of the molecules the atoms surrounding the central atom are all of the same ele