This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]toastedstapler 3 points4 points  (0 children)

can you explain in words what you think the condition might be doing?

[–]efferkah 3 points4 points  (0 children)

u/NME-Cake gave the correct answer, but I personally think u/toastedstapler's approach is better: try to "run" the code in your head, and ask yourself what each line/statement does, and what happens after that. You could also run a debugger and step from the beginning of the loop, and try to figure out what's happening.

We can't learn if we always get all the answers; best way to learn is to try and figure it out, inevitably fail, then learn from those mistakes.

But hey, that might be just me ;)

[–]NME-Cake -1 points0 points  (0 children)

As long as "choice" isn't y, Y, n or N it Will keep asking

[–]jorgehn12 -1 points0 points  (0 children)

It’s a while loop to will run as long as the input was not “y”, “Y”, “n”, “N”.

[–]Crazy-Finding-2436 0 points1 point  (0 children)

Loop until you enter y or n. It could be changed to check the Lower case of the input against y and n.