Coding Task: 05.03 Moody Menu

In this activity, we will be creating a simply mood indicator using emojis and a text menu.


Below is a demo of how the program should run:


Carefully run and review the example program above and write code to recreate the example. Please read the following important details:

  • Use mood as the state variable name.
  • The state values should be: “mood_happy“, “mood_sad“, “mood_angry“, and “mood_tired
  • Display the following emojis for each of the states:
    • “mood_happy”: 😁
    • “mood_sad”: 😢
    • “mood_angry”: 😡
    • “mood_tired”: 🥱
  • Ensure that the screen is cleared so that the menu is always at the top of the screen
  • Ensure that if the user selects an invalid option, display “Invalid mood” and then prompt “Press [Enter] to return to the main menu”.

The code for the item sub-menu has been completed for you as a reference.

Scroll to Top