subject

Code in Python 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 with input: 20
10.0
5.0
2.5
1.25
0.625

Note: If the submitted code has an infinite loop, the system will stop running the code after a few seconds and report "Program end never reached." The system doesn't print the test case that caused the reported message.

My code, it only passes one test with correct outputs
what am I forgetting?


Code in Python

Write a while loop that prints user_num divided by 2 until user_num is less than 1

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 20:50, solo4360
What does operator overloading allow you to do?
Answers: 2
image
Computers and Technology, 22.06.2019 04:30, safi30360oz0c34
What kind of software users of all skill levels create web pages that include graphics, video, audio, animation, and other special effects? website authoring website software website publishing website editing
Answers: 1
image
Computers and Technology, 22.06.2019 11:30, LindseyN1
One subtask in the game is to roll the dice. explain why is roll the dice an abstraction.
Answers: 3
image
Computers and Technology, 23.06.2019 07:00, bskyeb14579
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
You know the right answer?
Code in Python Write a while loop that prints user_num divided by 2 until user_num is less than 1....

Questions in other subjects:

Konu
History, 07.12.2019 10:31
Konu
Mathematics, 07.12.2019 10:31