09: Selection in Python

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.

Leave a Reply