-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOperators.py
More file actions
41 lines (34 loc) · 715 Bytes
/
Copy pathOperators.py
File metadata and controls
41 lines (34 loc) · 715 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
#Arithmertic operator:+,-,*,/,%
a=8
b=2
c=a+b
d=a%b
print("The sum is:",c)
print("The remainder is:",d)
#Asiignment operator:=,+=,-+
s=4
s+=3
print("The value of s is: ",s)
#Comparison operator:==,>=,<=,!=
e=6>=9
print(e)
f=8<=11
print(f)
#Logical operator
#OR
print("True or False is ",True or False)
print("True or True is ",True or True)
print("False or False is ",False or False)
print("False or True is ",False or True)
#And
print("True and False is ",True and False)
print("True and True is ",True and True)
print("False and False is ",False and False)
print("False and True is ",False and True)
#NOT
print(not(True))
print(not(False))
#type() of a variable
z="Simran"
print(type(a))
print(type(z))