Quiz Program – Part 2: adding to the quiz

Option 5 – Giving a hint

If the user get the answer wrong, give them a hint.

This is just a case of doing something in the else part of the if – else selection block.

Here's your question before you add the hint:

Code helper image

And this is the code to add to add the hint:

Code helper image

This seems like a lot of code, but you can copy and paste most of it! Just remember to indent the code as well.

You can also combine this with option 6 – repeating a question. Just add code to give the hint in the else part of the if – block. But now you don't need to repeat the question because it will already repeat itself...