Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (50.2k points)

Could someone tell me what is wrong with this Python Loop?

n = 5 while n > 0 : print(n) print('All done')

1 Answer

0 votes
by (108k points)

This loop will run forever this is the mistake here in this loop.

Check out the Python course from Intellipaat which is a 42hrs online instructor-led training course that comes along with 50hrs for projects and exercises to gain proficiency.

Also, check out our YouTube video on Python Loops from our experts to get started.

Browse Categories

...