I'm trying to get specific user-input from the user, and I want the user to enter certain words in order to go to other parts of the program. Can anyone tell be the best way to do this? I've built and run my code:
But, unfortunately, when I enter the words (in caps), it dosen't direct me to the function. It just closes the program... Can anyone help me on this? :(
(Btw main_menu is a string)
I tried your code and apparently it does not work for string containing spaces (like "START GAME") but it works for the others?
In your implementation the other options are not selectable?
If that's the problem until a better solution use "START_GAME" for example.
I'm trying to get the user to enter certain command-prompts in order to get to other parts of my functions. A bit Zork-Like where the user has to enter "pick apple up", in order to interact with the program... Anyone have any suggestions as to how I can do this?