-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasic.py program.py
More file actions
80 lines (72 loc) · 942 Bytes
/
basic.py program.py
File metadata and controls
80 lines (72 loc) · 942 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
a=8
b=9
temp=a
a=b
b=temp
print(a)
print(b)
a=5
b=7
a=a^b
b=a^b
a=a^b
print(a)
print(b)
a=20
a=a+1
print(a)
a=20
a=~20
print(a)
a=20
a=~-22
print(a)
a=20
a=-(~a)
print(a)
a=20
if (a/1==0):
print('even')
else:
print('odd')
a=20
b=6
c=5
x=5
print(x)
p=2
i=5
sum=p+i
sub=p-i
print(sub)
print(sum)
a=4
b=5
if a>b:
print('b is greater than a')
else:
print('a is greater than b')
list=["apple","banana","orange"]
list.append("chikku")
list.append("mango")
print(list)
a='anu'
print(len(a))
x=a.upper()
print(x)
t=('hii',)
a = int(input("enter the num "))
if (a%2==0 and a%3==0):
print("it is divisible by 2 and 3 ")
else:
print("not divisible")
for num in range(10):
print(num)
t=(10,'hello','True')
x=list[t]
y=tuple(x)
print(t)
print(y)
thisdict={'size':'fat','color':'black'}
thisdict['movie']='bahubali'
print(thisdict)