Conditionals: If, Then, Else

Conditionals: If, Then, Else
1 / 19
next
Slide 1: Slide

This lesson contains 19 slides, with interactive quizzes and text slides.

Items in this lesson

Conditionals: If, Then, Else

Slide 1 - Slide

This item has no instructions

Learning Objective
At the end of the lesson you will be able to understand conditional statements and practise using them.

Slide 2 - Slide

Introduce the learning objective and explain its importance to the students.
What do you already know about conditionals?

Slide 3 - Mind map

This item has no instructions

What are conditionals?
Conditionals are statements that depend on certain conditions being met. They are often used in programming and in everyday language.

Slide 4 - Slide

Introduce the concept of conditionals and provide examples of how they are used in programming and in everyday language.
If Statements
If statements are a type of conditional statement that checks if a condition is true. If the condition is true, the statement is executed.

Slide 5 - Slide

Explain the structure of if statements and provide examples of how they are used in programming.
Else Statements
Else statements are used in conjunction with if statements to provide an alternative action if the condition is false.

Slide 6 - Slide

Explain the structure of else statements and provide examples of how they are used in programming.
Else If Statements
Else if statements are used when there are multiple conditions to check. They are used in conjunction with if statements and else statements.

Slide 7 - Slide

Explain the structure of else if statements and provide examples of how they are used in programming.
Logical Operators
Logical operators are used in conditionals to combine multiple conditions. The most common logical operators are AND, OR, and NOT.

Slide 8 - Slide

Explain the different logical operators and provide examples of how they are used in conditionals.
Nested If Statements
Nested if statements are used when there are multiple conditions to check and the conditions depend on each other.

Slide 9 - Slide

Explain the structure of nested if statements and provide examples of how they are used in programming.
Using Conditionals in Programming
Conditionals are an essential part of programming. They are used to make decisions and control the flow of a program.

Slide 10 - Slide

Explain how conditionals are used in programming and provide examples of how they can be used to control the flow of a program.
Practise Time!
Now that you understand conditionals, it's time to practise using them. Complete the exercises provided by the teacher.

Slide 11 - Slide

Provide exercises for the students to practise using conditionals in programming.
Exercise 1
Write a program that checks if a number is positive or negative.

Slide 12 - Slide

Provide instructions for the students to complete the exercise.
Exercise 2
Write a program that checks if a number is even or odd.

Slide 13 - Slide

Provide instructions for the students to complete the exercise.
Exercise 3
Write a program that checks if a number is divisible by 3 or 5.

Slide 14 - Slide

Provide instructions for the students to complete the exercise.
Exercise 4
Write a program that checks if a number is between 1 and 10.

Slide 15 - Slide

Provide instructions for the students to complete the exercise.
Exercise 5
Write a program that checks if a number is a prime number.

Slide 16 - Slide

Provide instructions for the students to complete the exercise.
Write down 3 things you learned in this lesson.

Slide 17 - Open question

Have students enter three things they learned in this lesson. With this they can indicate their own learning efficiency of this lesson.
Write down 2 things you want to know more about.

Slide 18 - Open question

Here, students enter two things they would like to know more about. This not only increases involvement, but also gives them more ownership.
Ask 1 question about something you haven't quite understood yet.

Slide 19 - Open question

The students indicate here (in question form) with which part of the material they still have difficulty. For the teacher, this not only provides insight into the extent to which the students understand/master the material, but also a good starting point for the next lesson.