Computer Science LearnITWithMrC ⛯ Year 7 Year 8 Year 9 GCSE ## What do I need to Learn?

 I need to learn how to use two way selection in my programming (if, then, else)

## Knowledge Organiser  ## Lesson  1. Set your Learning Objectives to red.

2. Open your PowerPoint from last lesson.   ## Writing a quiz

Todays we will create a simple quiz with between 4 and 12 questions.

The code below is an example of set of how you might start your quiz ### Activity 1

1. Copy the code above, then Run it to see what happens .
3. Remember when we compare if things are equal in python we use == not a single =.  ## Creating a question

We looked last week how Edublocks can help us with our python syntax

So lets make the same question as we just did in task 2 using Edublocks Click on the link above to open up edublocks See if you can make the code using the blocks below Now look at the code by clicking on the button in the top right hand corner of the page.

The code should look like this:   If we want to keep track of how many questions the user has got right, then we need to introduce a variable to keep track of the users score. We will then assign a starting value to our variable which will be 0 as the users score will always start at 0. ### Activity 2

• Don't forget to save your code and then screenshot it into your PowerPoint.

•  ### Activity 3

1. Create a quiz with 5 questions, the quiz can be about anything you want.
2. Make a variable to keep score of the correct answers.

3. #### Extension ideas to make the quiz better

5. Print out the the score out of 5 when the quiz is over?
6. Have a different statement depending on the score the person got   ### Summing it all up

Lets look at the learning outcomes and decide which one best describes our current level of understanding :

Tick the one you feel is closest to your level

## Learning Outcomes I need to learn how to use two way selection in my programming (if, then, else)

• I have a basic understanding of how I can use two way selection in my programming (if, then, else) with a little help from my teacher
• I can show my teacher that I can use two way selection in my programming (if, then, else) without their help.
• I can use two way selection in my programming (if, then, else) independently and I can also explain it to others and can complete any extension tasks I am given.

## My Notes: coding-p  