Python| While Loop and If-Else together

preview_player
Показать описание
In this video you will learn how you can use Loop and IF-ELSE together in the same code and perform tasks.

Рекомендации по теме
Комментарии
Автор

I need help solving this problem

- Write a loop that asks the user to input an integer between

10 and 60. If they enter something that is not an integer in that range, ask them again, giving an error message to remind them. Once they enter an integer, create a loop that keeps dividing the number by two, taking its integer value, and printing the result until it reaches zero.

For example, entering 55 would produce: 55, 27, 13, 6, 3, 1 Run the code, first entering a value outside the range 10 -

60. Then run the code again with a valid value.

• Make sure your output shows the results of both runs

Satoshi
Автор

I think the loop exits because of the while's condition and not because of the decision statement

jacobsgeorge
Автор

Good tutorial Kumar. I am guessing that's your name seeing I saw the whole location of your while.py file in the video. (and you didn't be bleep the name out)

softwhere
Автор

can you please speak a language that is understandable. SIR!!!

manavporwal