Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure program to avoid recursion #42

Merged
merged 8 commits into from Jun 19, 2021
Merged

Restructure program to avoid recursion #42

merged 8 commits into from Jun 19, 2021

Conversation

PeanutbutterWarrior
Copy link
Contributor

I've changed a lot of the menus to now restart once an operation is done, rather than calling the function repeatably. Where appropriate, operations take you back to the previous menu.
I've also added an Exit exception, which is called from anywhere, winds back to the main menu, is caught and then the program is cleanly exited.

I've also added uses of repeat_input where I could, along with allowing it to take a function argument as an additional check on the input e.g. checking a number is greater than one. The function could still be improved to automatically convert the type (float to float, yes/no to boolean etc.)

@JordanLeich JordanLeich merged commit 810696d into JordanLeich:main Jun 19, 2021
@PeanutbutterWarrior PeanutbutterWarrior deleted the restructure branch June 19, 2021 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants