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

The “two vast and trunkless legs of stone” (line 2) belong to .”From Ozymandias “
please help me with this :) (screenshot below)
Help meeeeee i don't know it and i will give brainlest
Define horizontal integration.
Work out 5(-2) x 327 Give your answer as a decimal.
Which of the following sets of values completes the function table? a. 6, 14, 34 b. 15, 21, 29 c. 10, 18, 38 d. 10, 18,39
What does the dynamo theory help explain?​
sa anong kabihasnan nagmula ang powder​
When a leader exerts definite attention in order to meet a goal, the leader is best described as A charismatic B. manipulative C. censoring D. determined
Mindy and Troy combined ate 999 pieces of the wedding cake. Mindy ate 333 pieces of cake and Troy had 1/4 of the total cake. ​ Write an equation to determine ho