Closed raduiman-zz closed 6 years ago
To answer to Bogdan suggestion of using switch:case instead of if-elif: -as I know Python does not have a switch statement like Java, C, C++ -I've created this method using "if-elif-else" block with the same behavior like "switch:case" statement.
Please let me know if I'm wrong.
To increase the efficiency of this script we have to find a way to jump at the final of the if-elif-else block after a condition is accomplished. e.g if the option is '1', the first case is fulfilled and then the script is going further and check all the cases. It should exit from the 'if-elif' block and ask for another option.
Maybe an option would be going with a
while True: do something
And then, when you accomplish what you are looking for, change the flag to False and if it's false, make it jump to the end. Or you could use Cases https://jaxenter.com/implement-switch-case-statement-python-138315.html
Add the new menu.py to fix the issue reported by Travis with the first PR.