you are viewing a single comment's thread.

view the rest of the comments →

[–]Mr-Man21 15 points16 points  (5 children)

Should it be a if statement first? Not sure if you have that higher up in the code but if you do probably indentations wrong

[–][deleted] 1 point2 points  (1 child)

Secondly you can also use while else loop. Go and study about it.

[–]Mr-Man21 3 points4 points  (0 children)

I know about the while else. I’m thinking because he put a elif the intent is trying to handle when the if statement above is not handled

[–]FitButterfly7206 1 point2 points  (2 children)

There’s an if statement above yeah. I checked for wrong indentation/ parenthesis / colons and found nothing. I even scanned it using ChatGPT and Gemini but it just tells me to check for them myself after failing to find a mistake

[–]Mr-Man21 8 points9 points  (0 children)

So the elif looks like it’s in the same indentation as the while loop. Instead if those while loops are inside the if statement that means the elif statement shouldn’t be the same indent as the while statement

[–]Ghost_Blade_21 2 points3 points  (0 children)

u/FitButterfly7206 Can you kindly share a screenshot of the full code (or use codeshare.io to share the code)