Discover the answers you need at Westonci.ca, where experts provide clear and concise information on various topics. Explore our Q&A platform to find in-depth answers from a wide range of experts in different fields. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform.

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:

Sagot :

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.