1 minute read

4. Logical Operators II

Objectives

In this session, students will learn about -

● NOT operator

● Using logical operators with mathematical conditions

Keywords

● NOT operator/ Logical NOT: Reverses the value of the boolean input

WEBS at a Glance

Recall the concepts covered in the previous coding session

Play the video given in the panel to introduce the concepts to be covered in this session

Discuss NOT operator and using logical operators with mathematical conditions

Activity given in the panel Solved Examples – Q3.3 and 3.4 from the coding booklet

Conclude the session Assign the homework

● Instruct: Go to the Panel and open the Lab on Logical Operators II.

● Play the video given in the panel.

● Discuss the Quiz questions given in the Panel.

● Invite answers from as many students as possible.

● Conduct Logical Operators given on Pages 18-21:

■ Say: Let us see what the logical operators are and how they function.

■ Instruct: Click on the Assignment section.

■ Instruct: Click the Go to Practise button to attempt the activity.

■ Walk around in the classroom and observe the activity done by the students.

■ Instruct: Click on the Yes button to submit the activity.

Note

● If time permits, conduct the additional activity given in the panel.

● Ask the following probing questions:

■ Give some examples of using the NOT operator.

Possible Responses: Not an odd number; Not a multiple of 5; Age is not less/greater than 18; Not red (or any colour)

■ Can you combine logical operators and comparison operators? Give an example.

Possible Responses: Yes

● Assign the following project as homework:

■ Ask the user to input a number. Add a condition to check if the number is a three-digit number.

Note

● The project is optional. Assign it if feasible.

This article is from: