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 is social Darwinism and how was it tied to imperialism?
what is 5m+6+m-18=60
Solve the equation: 1/4 + w = 6 1/3
Carla's plant was 10 2/3 inches tall. Yolanda's was 8 3/4 inches tall. How much taller was Carla's plant than Yolanda's?I came up with 2 11/12.   Am I right??
what does the expression "what ever floats your boat" mean?
How do you find the length of a circle in geometry?
Ryker is given the graph of the function y= 1/2x^2 - 4 . He wants to find the zeros of the function but is unable to read them exactly from the graph. Find the
[(24+16) divided by 8 times 5)]=? Please answer pllleeeaaaasee.
Find the explicit formula that produces the given sequence. 3/2, 3/4, 3/8, 3/16,...
Which word correctly completes the sentence? The white-tailed __________ fawn followed closely by her side.  A.deer's  B.deers  C.deers'