1 minute read

2. Comparison Operators II

Next Article
4. Conditions IV

4. Conditions IV

Objectives

In this session, students will learn about -

● Comparison Operators –

■ Less than, less than equal to operators

■ Greater than, greater than equal to operators

Keywords

● Comparison Operators: Are used to compare two numbers or strings

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 less than, less than equal to, greater than, and greater than equal to operators

Activity given in the panel Solved Examples – Q3.1, 3.2 from the coding booklet

● Instruct: Go to the Panel and open the Lab on Comparison 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.

Conclude the session Assign the homework

● Conduct Who is Elder given in the Panel:

■ Say: Let us compare the ages of two siblings to see who is the older.

■ 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:

■ What is the difference in the output of greater than and greater than equal to?

Explain with the help of an example.

Possible Responses: Greater than will give the output as true only if the first number is greater than the second; Greater than equal will give true even when the numbers are equal.

Example: num1 = 6 and num2 = 6 Here, Num1 is greater than num2 will give the output as false, while greater than equal to will give true.

■ Name all the comparison operators we can use in Blockly.

Possible Responses: Equal to; Not equal to; Greater than; Greater than equal to; Less than; Less than equal to

● Assign the following project as homework:

■ Compare two numbers and check what results you get using the 6 comparison operators that you have studied.

Note

● The project is optional. Assign it if feasible.

This article is from: