# Lesson 5 – Making an artificially intelligent maths game (Assessment)

Learning Outcomes

• Design and code a maths game based upon what you have learned over the last 4 lessons

Starting with a blank file, you need to create your own number game using Python. You should add an appropriate amount of comments to your game including a header with your name, the title and a brief description of how to play the game. You should also add in line comments to explain particular parts of the program code. Your game should include at least five questions and you need to decide what the actual questions are about and the level of difficulty.

The questions you set must be maths related – for example:

How many seconds are there in 1 hour?
How many days are there in a leap year?
If a triangle has two angles at 45 degrees, what will the remaining angle be?
If a = 2b -5 and b is 6, what is a?
What is the minimum legal age to vote in the UK?
What is 10010001 converted to denary?

Once you have completed the task it should be saved, the code printed out and placed into your folder.  The assessment criteria are below:

Assessment Criteria

All students must (Level 4):

• Create a game that works and save it.
• Use enough comments to explain how the game works.
• Add a scoring feature to the game.

Most students should (Level 5):

• Ask the user some questions at the beginning of the game, e.g. user’s name and make use of it throughout the game.
• Add a function to report the score after each question.
• Include some responsive feedback at the end of the game specific to the score.
• In a comment describe a feature to be included in a future version of the game.

Some students could (Level 6):

• Include a larger set of questions that increase with difficulty as the game progresses.
• Allow the user to try again on a wrong answer, but award a reduced score for a second try.
• Give the user some feedback mid way through the game as encouragement.