Extend it:

Tell your code how to make decisions
Python Selection: Tell your code how to make decisions

Now that you can get your code to make decisions, you can create much more interesting python projects.

Adapt the code below to create your own quiz.

Your quiz must contain 10 questions but you can choose any topic you’re interested in.

Challenges:

 
  1. Ask at least 10 questions

    Copy and paste the code for Q1 and adapt it so that it asks 10 different questions.

  2. Check if the user gets the right answer

    Use selection (an if statement) for each question to see if the user enters the right value 

  3. Display “Well done” if the user gets all questions right

    Look for the if statement that compares score with MAX_SCORE and add an else statement

Use your imagination and creativity alongside your logical thinking skills to see what you can create.

Page 1: Intro

Page 2: The theory: learn what you need to know as fast as possible.

Page 3: Try it: try out and adapt some working python code snippets.

Page 4: Debug it: Learn how to find and fix common mistakes.

Page 5: Extend it: Choose a project idea to use your newfound python skills.