# Comparison Operators in Python Class 11 Important Notes with Questions

Share with others

## Comparison Operators in Python

### What are Operators ?

Operators are special symbols which perform a special task on values or variables. Same operator can behave differently on different data types.

### What do you mean by Operand?

Operands are the values or variables on which the operator operate.

### What do you mean by Expression in python?

Operators when applied on operands form an expression. for example

a = c – d

### Identify the operator and operand in the following expression.

1) d = a * b

Here d, a, b are operands and = , * are operators

2) c = a + b

Here c, a, b are operands and =, + are operators

### Operators are categorized as

1. Arithmetic

2. Relational

3. Logical

4. Assignment

Relational/Comparison Operators

Those operator which help to compare two or more values/variables are called Comparison Operators. The output of comparison operator is Boolean value(True or False).

## Q1. Evaluate the following

a) >>> 7 + 5 >= 10

Ans. True

b) >>> “Anil” > “anil”

Ans. False

c) >>> 25 % 3 == 2

Ans. False

d) >>> 23 // 7 >= 9

Ans. False

e) >>> 7 + 3 % 2 != True

Ans. True

f) >>> False == False

Ans. True

g) >>> True != False

Ans. True

h) >>> 78 % 9 % 2 == 0

Ans. True

i) >>> 29 == 89 % 30

Ans. True

j)>>> 45 // 68 % 2 == True

Ans. False

Disclaimer : I tried to give you the correct explanation of “Comparison Operators in Python ” , but if you feel that there is/are mistakes in the explanation of “Comparison Operators in Python given above, you can directly contact me at csiplearninghub@gmail.com.

Class 12 Computer Science Sample Paper 2020-2021.

Class 12 Computer Science Sample Paper Marking Scheme

Class 12 Computer Science Test Series

Share with others
error: Content is protected !!