Coding Exercise: Making Decisions

Let's test your learning about conditional statements.

We'll cover the following

Problem

This exercise makes decisions based on your mood. Write code for a console application that meets the requirements listed below.

  1. Make conditions on a string variable named mood.
  2. If the value of mood is Good, write I am glad you are in such a good mood today! on the console.
  3. If the value of mood is Ok, write It's Ok to be in an Ok mood! on the console.
  4. If the value of mood is Bad, write That is a bummer, take a break and cheer up! on the console.
  5. If the value of mood is anything else, write I couldn't figure out what mood you are in! on the console.

Sample input

The program will accept one string parameters, for example:

"Good"

Expected output

The finished output of the program should look like the example below:

I am glad you are in such a good mood today!

Get hands-on with 1200+ tech skills courses.