Coding Task: 05.03 A Quiz

Who wants to be a millionaire? I do!

Your Task

Draw a flowchart for a program that asks the user a question, and if they answer correctly, print back Correct!. Then in the editor below, write the program in Python and test it to make sure that it works!

Python Reference Sheet

Remember to use the Python reference sheet to help you with your code! Click on one of the buttons below:

Requirements

  • The program should run without any errors.
  • The program should ask the user a question and then prints Have a nice day!. If the user types the correct answer, then the program should print Correct! in green text before it prints Have a nice day!.
  • Hint: Remember, indentation is crucial when dealing with if statements in Python! Everything “inside” the if statement has to line up, and don’t forget the colon (:) at the end of the if statement!

Example

Below is an example of how the program should run:

What is the capital city of Iceland? Canberra
Have a nice day!
What is the capital city of Iceland? Reykjavik
Correct!
Have a nice day!
Scroll to Top