0% found this document useful (0 votes)
2 views3 pages

Python Operators Class11 12 NCERT

The document provides an overview of Python operators, categorized into arithmetic, relational, logical, assignment, bitwise, identity, and membership operators, along with their meanings and examples. It also outlines the operator precedence from highest to lowest. This information is intended for Class 11 and 12 students following the NCERT curriculum.

Uploaded by

amazeabhijeet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

Python Operators Class11 12 NCERT

The document provides an overview of Python operators, categorized into arithmetic, relational, logical, assignment, bitwise, identity, and membership operators, along with their meanings and examples. It also outlines the operator precedence from highest to lowest. This information is intended for Class 11 and 12 students following the NCERT curriculum.

Uploaded by

amazeabhijeet
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Python Operators - Class 11 & 12 (NCERT)

1. Arithmetic Operators

Operator Meaning Example

+ Addition 5+3=8

- Subtraction 5-3=2

* Multiplication 5 * 3 = 15

/ Division 5 / 2 = 2.5

// Floor Division 5 // 2 = 2

% Modulus 5%2=1

** Exponentiation 2 ** 3 = 8

2. Relational (Comparison) Operators

Operator Meaning Example

== Equal to 5 == 5 -> True

!= Not equal to 5 != 3 -> True

> Greater than 5 > 3 -> True

< Less than 5 < 3 -> False

>= Greater than or equal 5 >= 5 -> True

<= Less than or equal 5 <= 3 -> False

3. Logical Operators

Operator Meaning Example

and Logical AND True and False -> False

or Logical OR True or False -> True

not Logical NOT not True -> False

4. Assignment Operators

Operator Meaning Example

= Assign x=5

+= Add and assign x += 2 -> x = x + 2


Python Operators - Class 11 & 12 (NCERT)

-= Subtract and assign x -= 2

*= Multiply and assign x *= 2

/= Divide and assign x /= 2

//= Floor divide and assign x //= 2

%= Modulus and assign x %= 2

**= Exponent and assign x **= 2

5. Bitwise Operators

Operator Meaning Example

& Bitwise AND 5 & 3 -> 1

| Bitwise OR 5 | 3 -> 7

^ Bitwise XOR 5 ^ 3 -> 6

~ Bitwise NOT ~5 -> -6

<< Left Shift 5 << 1 -> 10

>> Right Shift 5 >> 1 -> 2

6. Identity Operators

Operator Meaning Example

is True if both refer to same object x is y

is not True if not same object x is not y

7. Membership Operators

Operator Meaning Example

in True if value found 'a' in 'abc' -> True

not in True if value not found 'd' not in 'abc' -> True

Operator Precedence (Highest to Lowest)

1. ()

2. **
Python Operators - Class 11 & 12 (NCERT)

3. Unary +, -

4. *, /, //, %

5. +, -

6. <, <=, >, >=

7. ==, !=

8. not

9. and

10. or

11. Assignment (=, +=, etc.)

You might also like