+ 3

[Solved] Why does this loop only return one iteration?

This code is supposed to print all iterations at once. It worked perfectly but once I changed it into a loop, it only prints the first iteration, starts over and prints another iteration, one per loop instead of all per loop. I suspect a wrong indentation but I can't figure out where. Would someone kindly point me in the right direction? https://code.sololearn.com/ck8GxZ8zW8EJ/?ref=app

10th Oct 2020, 7:18 PM
Adam Stork
Adam Stork - avatar
2 Answers
+ 9
I would recommend you to move the line with input() just before the while loop.
10th Oct 2020, 7:34 PM
Lothar
Lothar - avatar
+ 2
Lothar That's it! Thank you!
10th Oct 2020, 7:38 PM
Adam Stork
Adam Stork - avatar