Westonci.ca is your go-to source for answers, with a community ready to provide accurate and timely information. Join our Q&A platform to get precise answers from experts in diverse fields and enhance your understanding. Experience the ease of finding precise answers to your questions from a knowledgeable community of experts.

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.