-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path21.py
More file actions
63 lines (53 loc) · 1002 Bytes
/
Copy path21.py
File metadata and controls
63 lines (53 loc) · 1002 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# operators in python
# Arthmetic operator
# Assignment operator
# Comparision operator
# Logical operator
# Identity operator
# Membership operator
# Bitwise operator
# Arthemetic operator
# print("5 + 6 is ", 5+6)
# print("5 - 6 is ", 5-6)
# print("5 * 6 is ", 5*6)
# print("5 ** 3 is ", 5*5*5)
# print("15 // 6 is ", 15//6)
# Assignment operator
# x = 10
# x += 10
# x /= 5
# x -=2
# x *= 2
# print(x)
# Comparision operator
# i = 5
# print(i==5)
# print(i>=5)
# print(i<=5)
# Logical operator
from operator import truediv
# a = True
# b = False
# print(a or b)
# print(a and b)
# idenditiy operator
a = True
b = False
# print(a is b)
# print(a is not b)
# print(a is not 7)
# print(5 is not 5)
# print(5 is 5)
# Membership operator
# list = [3, 3, 2, 2, 39, 33, 35, 32]
# print(232 in list)
# Bitwise operator
# 0 = 00
# 1 = 01
# 2 = 10
# 3 = 11
# print(0 & 1)
# print(2 & 3)
# print(0 or 1)
# print(0 | 1)
# print(0 | 3)