Multiple while loop in a single program

How to use more than one while loop in a python program, to serve 2 different services. I tried to apply while loop but while it executes only the first while loop, it’s also not showing any indentation error.
Here is my code:



You may check this link for multiple while loops:

Hii @11170021
Statements within a while True block continue endlessly and hence the code gets stuck there. If you want to run 2 while loops in the same code, then you’ll have to initiate while loops with a condition. For example:

Capture
As you can see the while loop will terminate after 5 iterations. A similar condition satisfying your need will repair you code. The current problem with your code is that after your code enters the second while loop, there is no break for it, so it continues forever.

Hope this helps! :smiley: