0 results for
Responsive image

Coding in Python - Maths Quiz

0 results forGuest
Flight Path
Learning Objectives
0 results forGuest
 5 I can make use of 'if' statements to create a maths quiz

Starter - Task

🏁 Learning Objective 11 :- I can make use of 'if' statements to create a maths quiz

Creating a maths quiz

Create a test that will check the user’s knowledge of simple maths quiz , with between 4 and 12 questions.

You must save it with the name maths_quiz.py and it must include a header comment, with description, name of creator and date.

The program must feature some other use of comments and must work successfully.

Here is a reminder from last lesson how you might start your quiz

Adding in a score variable

Look at the code below to see how you could create a variable to keep a score of the correct answers.

Outputting the score

Look at the code below to remind you how you could give the user their final score.

Extension task

Can you think of a way that you could tell the user how many questions the user had answered and put that as part of their final score?

For example if you asked 5 questions and they got 4 correct could you output:

"Well done you got 4 out of 5 correct"

Update your objectives


0 results forGuest
Recent Comments

Teacher Date: 2020-07-05