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

Part of the population of 7,500 elk at a wildlife preserve is infected with a parasite. A random sample of 50 elk shows that 3 of them are infected. How many el
what’s 690 divided by 4???
help me find the area please
Which animal is found in a rainforest? hyacinth macaw panda arctic fox grizzly bear
A scuba diver is what type of resource ? A. Natural resource (N) B. Human resource (H) C. Capital good (C).
!!!?!!?!?!!??!!!!!!!!!?!
Write two sentences in Spanish each using a different form of SER
How many solutions do these questions have? (WILL GIVE BRAINLIEST!) 1.) 2x-9y=-5 2.) 4x-6y=2
An elemental gas has a mass of 10. 3g. If the volume is 58. 4 l and the pressure is 758 torr at a tempertaure of 2. 5 c what is the gas
alg 1 adding/subtracting with rational expression