Lesson 11 : Boolean Operator
Challenge focus: 75 - 78
Coding Concepts : not operator
Properties
Methods
.
December 2023
Banana Tales I
Key stage III
Class VII
LESSON OVERVIEW
CODING CONCEPT | Boolean Operators (not) | |||
CHALLENGE | 75 | 76 | 77 | 78 |
SUB CONCEPTS |
| |||
RESOURCES | Lesson Plan 31 Boolean Operators - not |
December 2023
Banana Tales I
Key stage III
Class VII
Lesson Objectives
At the end of the lesson, each child should be able to:
December 2023
Banana Tales I
Key stage III
Class VII
Understanding not Operator
Condition | not condition |
True | False |
False | True |
December 2023
Banana Tales I
Key stage III
Class VII
Activity 1
Study the given statements and state whether it is true or false.
X | Y | X or Y | X and Y | not (X and Y) |
75 != 10 | 80 >= 100 | | | |
67 <= 89 | 90 > 35 | | | |
89 == 89 | 200 < 300 | | | |
December 2023
Banana Tales I
Key stage III
Class VII
Activity 1 Solution
X | Y | X or Y | X and Y | not (X and Y) |
75 != 10 | 80 >= 100 | True or False = True | True and False = False | True |
67 <= 89 | 90 > 35 | True or True = True | True and True = True | False |
89 == 87 | 200 < 150 | False or False = False | False and False = False | True |
December 2023
Banana Tales I
Key stage III
Class VII
Demo 1
Study the challenge carefully. Write the codes in your notebook to help the banana reach to the monkey (challenge 75).
December 2023
Banana Tales I
Key stage III
Class VII
Demo 1 Solution
1 2 3 4 | if not well.crocodile.mouth_closed: well.crocodile.toggle() while well.water_level < well.max_water_level: elephant.spray_at(well) |
condition
operator
December 2023
Banana Tales I
Key stage III
Class VII
Activity 2
Study the following challenge and solution carefully. Then answer the following questions in your notebook (challenge 77).
December 2023
Banana Tales I
Key stage III
Class VII
Activity 2 (Cont.)
December 2023
Banana Tales I
Key stage III
Class VII
Activity 2 Solution
Ans: A for loop is used because there are many wells to fill up with water and many crocodiles to close mouth.
Ans: The len() function used as len(wells) in Line 1 will count the total number of wells in the list called wells.
Ans: The if statement in Line 2-3 will check whether a crocodile’s mouth is opened or not. If it is open, then the state is toggled.
Ans: The while loop in Line 6-7 will make the elephants spray water in their respective wells until the current water_level of the wells become equal to its max_water_level.
December 2023
Banana Tales I
Key stage III
Class VII
Activity 3 - Practical
December 2023
Banana Tales I
Key stage III
Class VII
Activity 3 Solution
75
December 2023
Banana Tales I
Key stage III
Class VII
Activity 3 Solution
76
December 2023
Banana Tales I
Key stage III
Class VII
Activity 3 Solution
77
December 2023
Banana Tales I
Key stage III
Class VII
Activity 3 Solution
78
December 2023
Banana Tales I
Key stage III
Class VII
Key Points
December 2023
Banana Tales I
Key stage III
Class VII