A Simple Menu System
First, I print out the menu for the user and Clear the Screen first to make it a lot easier to read. Using the Triple Quotes allows me to span text across multiple lines without individual print statements or cramming all the text onto one line using \n.
Next I use an “ans” as input to take the users choice (although the input is a number choice, I take the input as a string so that the program does not crash if the user mistypes of enters any other character than a number - this can be highlighted with students if required).
Then I have a conditional framework which just has some redundant print statements (but which function to show the students) which also show which part of the loop is working
The code is then placed inside a “while” loop with a "break" used to exit the loop (and the program).
The else is used to validate any other data inputted that does not match the choices I have allowed in the conditional part of the program.