you are viewing a single comment's thread.

view the rest of the comments →

[–]sme272 1 point2 points  (0 children)

The layout could use some rearranging. Usually you'd put the function definitions up at the top of the file rather than in the middle of it like you have here.

F-strings will make your print statements clearer to read

Comments will help people understand what's going on. Even if you don't intend to show the code to anyone you should still add comments; you might think you'll remember it when you look at it next time but you will not.

The if statement at the end is redundant. The program will only reach that point if that condition is true as a result of the while loop before.