Virtual Pet

The same principles as menus and choices are demonstrated here in virtual pet. 

Two definitions have been made that take one parameter (how)  

Then a menu and a get menu choice definition.

The definition to handle the choice from the menu - sent to this as a parameter called choice.

Finally the main() definition to make the program work.   Uses a while loop to run the program until the user wants to stop.  - line 41 below is where the program starts by calling the main definition. 

You can obviously add more options to the menu and the handle the choice to give your pet more actions.