Week 12

Final Quest: Build a Quiz Game

Aim: Plan, build, test and improve a complete Python project.

New coding words

  1. plan
  2. algorithm
  3. test
  4. score
  5. project

What the coding words mean

  1. plan: Deciding what a program should do before writing the code.
  2. algorithm: A set of ordered steps for completing a task.
  3. test: To run a program with different answers and check what happens.
  4. score: A variable that keeps count of the points earned.
  5. project: A complete program that combines several coding skills.
What you will discover
  • A project combines ideas learned in earlier weeks.
  • A quiz uses input, variables, conditions and calculations.
  • Testing checks whether expected and unexpected answers work.
  • score = score + 1 increases the score.
Code along

Build a one-question quiz

Ask one question, check the answer and update a score variable.

Python coding spaceReady to run
.py

Tab indents. Esc then Tab leaves the editor. Ctrl/⌘ + Enter runs your code.

Output (Shell)What your program does
Select Run my code to try this program.
Opening your coding space…Each activity has its own saved code.
Mini project

My Amazing Quiz

Combine input, conditions and a score to build a three-question quiz.

Python coding spaceReady to run
.py

Tab indents. Esc then Tab leaves the editor. Ctrl/⌘ + Enter runs your code.

Output (Shell)What your program does
Select Run my code to try this program.
Opening your coding space…Each activity has its own saved code.

Your mini-project to-do list

0 of 4 completed

Complete these activities in the mini-project editor above. After each change, select Run my code to check your program’s output or drawing.

Save your finished mini project

Select Download my work and save the file as week_12_amazing_quiz.py. The .py ending tells us that the file contains Python code. Keep this file as a copy of your finished program.

Debugging detective

Chi Opara, your course guide

Knowledge check

Question 1

Which variable keeps the quiz points?

Choose one answer
Question 2

Give one answer you would test and describe what you expect the quiz to do.

Your answers are checked in this browser and are not submitted.

How are you getting on so far?

My checklist

Finished Week 12?

This progress is saved only in this browser.