Conditionals: If, Then, Else

Conditionals: If, Then, Else
1 / 19
suivant
Slide 1: Diapositive

Cette leçon contient 19 diapositives, avec quiz interactifs et diapositives de texte.

Éléments de cette leçon

Conditionals: If, Then, Else

Slide 1 - Diapositive

Cet élément n'a pas d'instructions

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

Slide 2 - Diapositive

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

Slide 3 - Carte mentale

Cet élément n'a pas d'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 - Diapositive

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 - Diapositive

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 - Diapositive

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 - Diapositive

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 - Diapositive

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 - Diapositive

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 - Diapositive

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 - Diapositive

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 - Diapositive

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 - Diapositive

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 - Diapositive

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 - Diapositive

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 - Diapositive

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

Slide 17 - Question ouverte

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 - Question ouverte

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 - Question ouverte

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.