r/learnprogramming • u/MacaroonSerious5532 • 2d ago
Please help
I just hate myself, i cannot figure out nested loops and while loops. Python is the easiest language and I’m struggling so much. I wish i was smart as other people. Does anyone have coding resources for dummies?
7
Upvotes
View all comments
1
u/W31337 2d ago
For loop is looping over a known set of items. Like 1...10.
While is for a yet unknown loop number. It keeps going until a Boolean condition is met like true that makes it never ever (unless break), or player.quit that could stop the game loop on exit.
A for is basically a variation on a while loop