Computer Science LearnITWithMrC ⛯ Year 7 Year 8 Year 9 GCSE
0 results for
ICT
Responsive image

Lesson 4 - Making a quiz

0 results forGuest
Overview
Flight Path
Learning Objectives
0 results forGuest
IDSkill_name
 7 I can use two way selection in my programming (if, then, else)

🏁 Learning Objective 15 :- I can use two way selection in my programming (if, then, else)


If Then Else

The code below shows you how you can make a simple quiz using an if statement


Writing a quiz

If we want to have more than two otions when we make a choice, we can do that in python by using an elif statement.

The code below is an example of set of choices for a quiz

Task

1. Create a quiz with 5 questions, the quiz should be about python?

Extension ideas to make the quiz better

  • Make a variable to keep score of the correct answers?
  • Print out the correct answer when the answer is wrong?
  • Print out the the score out of 5 when the quiz is over?
  • Have a different statement depending on the score the person got

Update your objectives

control


0 results forGuest
Recent Comments

Teacher Date: 2021-09-28


Guest