I have to make a program with a text based menu system for a school project. It includes a main menu and multiple sub-menus. I have made my current version of the menu with LOTS of if-statements, prints and inputs. But it is neither a elegant nor easy solution. I was hoping there was a easier / better way to create a menu.
To be more precise, I need a method of calling the menu (to display it) after which I can choose an option, which then executes some code.
The structure looks as follows.
- Input data Filters
- Filters
- Add filter
- Type 1
- Type 2
- Type 3
- Remove filter
- Edit filter.
- Add filter
- Do calculations
- Mean
- Standard variation
- etc.
- Create plot
- Exit