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

Operators

The document discusses various Python operators like arithmetic, relational, logical and bitwise operators. It shows the output of calculations performed using different operators on variables A and B.

Uploaded by

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

Operators

The document discusses various Python operators like arithmetic, relational, logical and bitwise operators. It shows the output of calculations performed using different operators on variables A and B.

Uploaded by

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

Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.

1929 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
TYPES OF OPERATERS
SyntaxError: invalid syntax
A=12
B=6

=========================================== RESTART: C:\Users\Lenovo\AppData\Local\


Programs\Python\Python310\py class.py ==========================================
10

=========================================== RESTART: C:\Users\Lenovo\AppData\Local\


Programs\Python\Python310\py class.py ==========================================
10

=========================================== RESTART: C:\Users\Lenovo\AppData\Local\


Programs\Python\Python310\py class.py ==========================================
10

=========================================== RESTART: C:\Users\Lenovo\AppData\Local\


Programs\Python\Python310\py class.py ==========================================
10
2

=========================================== RESTART: C:\Users\Lenovo\AppData\Local\


Programs\Python\Python310\py class.py ==========================================
10
2
24
1.5
1
2
1296

=========================================== RESTART: C:\Users\Lenovo\AppData\Local\


Programs\Python\Python310\py class.py ==========================================
sum of a and b 10
sub of a and b 2
mul of a and b 24
div of a and b 1.5
divi of a and b 1
modu of a and b 2
power of a and b 1296

====================================== RESTART:
C:/Users/Lenovo/OneDrive/Desktop/python class and lab/relational operators.py
=====================================
gre of a and b <built-in function sum>
less of a and b False
equal of a and b False
not equal of a and b True
greater than equal of a and b True
less than equal of a and b False

====================================== RESTART:
C:/Users/Lenovo/OneDrive/Desktop/python class and lab/relational operators.py
=====================================
gre of a and b 4
less of a and b 7

====================================== RESTART:
C:/Users/Lenovo/OneDrive/Desktop/python class and lab/relational operators.py
=====================================
and of a and b 4
or of a and b 7

====================================== RESTART:
C:/Users/Lenovo/OneDrive/Desktop/python class and lab/relational operators.py
=====================================
and of a and b 4
or of a and b 7
or of a and b -7
Traceback (most recent call last):
File "C:/Users/Lenovo/OneDrive/Desktop/python class and lab/relational
operators.py", line 10, in <module>
print ("xor of a and b",XOR)
NameError: name 'XOR' is not defined. Did you mean: 'OR'?

====================================== RESTART:
C:/Users/Lenovo/OneDrive/Desktop/python class and lab/relational operators.py
=====================================
and of a and b 4
or of a and b 7
or of a and b -7
xor of a and b 3

====================================== RESTART:
C:/Users/Lenovo/OneDrive/Desktop/python class and lab/relational operators.py
=====================================
and of a and b 0
or of a and b 1
or of a and b -1
xor of a and b 1

====================================== RESTART:
C:/Users/Lenovo/OneDrive/Desktop/python class and lab/relational operators.py
=====================================
and of a and b 10
or of a and b 15
or of a and b -16
xor of a and b 5

====================================== RESTART:
C:/Users/Lenovo/OneDrive/Desktop/python class and lab/relational operators.py
=====================================
and of a and b 1092
or of a and b 1119
or of a and b -1112
xor of a and b 27

====================================== RESTART:
C:/Users/Lenovo/OneDrive/Desktop/python class and lab/relational operators.py
=====================================
and of a and b 10
or of a and b 15
or of a and b -16
xor of a and b 5

You might also like