0% found this document useful (0 votes)
1 views2 pages

Python Operators

The document outlines three types of operators in Python: arithmetic, comparison, and logical operators. It provides a list of each type, detailing their functions such as addition, subtraction, and logical conditions. Additionally, it explains the truth tables for logical operators AND and OR.

Uploaded by

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

Python Operators

The document outlines three types of operators in Python: arithmetic, comparison, and logical operators. It provides a list of each type, detailing their functions such as addition, subtraction, and logical conditions. Additionally, it explains the truth tables for logical operators AND and OR.

Uploaded by

shezaarfan123
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Operators:

Python has several types of operators:


1- Arithmetic operators: +, -, *, /, //, %, **
2- Comparison Operators: ==, !=, <, >, <=, >=
3- Logical Operators: and, or, not

Arithmetic Operators:
- add (+)
- subtract (-)
- multiply ( * )
- divide ( / )
- divide ( // )
- modulus (%)
- power (**)

Comparison Operators:
- greater than (>)
- less than (<)
- greater than and equal to (>=)
- less than and equal to (<=)
- equal to (==)
- not equal to (!=)

Logical Operators:
Condition1 AND Condition2 = Result
Cond1 AND Cond2 Res
True True True
True False False
False True False
False False False
“ AND ko sirf aik FALSE chahiye hota hai FALSE hone ke liye “
Condition1 OR Condition = Result
Cond1 OR Cond2 Res
True True True
False True True
True False True
False False False
“ OR ko sirf aik TRUE chahiye hota hai TRUE hone ke liye ”

You might also like