-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram21.py
More file actions
87 lines (64 loc) · 1.45 KB
/
program21.py
File metadata and controls
87 lines (64 loc) · 1.45 KB
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
81
82
83
84
85
86
87
#https://pynative.com/
print('My', 'Name', 'Is', 'James', sep='**')
print('my' , 'name' ,'is', 'arif' ,sep='##')
print('%o,' % (8))
print('%o,' % (16))
print('%.2f' % 458.541315)
print('%2f' % 543.56456)
floatNumbers = []
n = int(input("Enter the list size : "))
print("\n")
for i in range(0, n):
print("Enter number at location", i, ":")
item = float(input())
floatNumbers.append(item)
print("User List is ", floatNumbers)
for i in range(10, 15, 1):
print( i, end=', ')
var = "James" * 2 * 3
print(var)
x = 36 / 4 * (3 + 2) * 4 + 2
print(x)
listOne = [20, 40, 60, 80]
listTwo = [20, 40, 60, 80]
print(listOne == listTwo)
print(listOne is listTwo)
hh= 5**2
kk = 5**3
print(hh)
print(kk)
salary = 8000
def printSalary():
salary = 12000
print("Salary:", salary)
printSalary()
print("Salary:", salary)
var= "James Bond"
print(var[2::-1])
hh = "ariful islam"
print(hh[4::-1])
for i in range(1, 5):
print(i)
else:
print("this is else block statement" )
p, q, r = 10, 20 ,30
print(p, q, r)
for x in range(1,5,1):
print(x)
for i in range(1, 5):
print(i)
else:
print("this is else block statement" )
sampleSet = {"Jodi", "Eric", "Garry"}
sampleSet.add("jjh")
print(sampleSet)
var1 = 1
var2 = 2
var3 = 3
print(var1 + var2 + var3)
str = "pynative"
print (str[1:3])
def calculate (num1, num2=4):
res = num1 * num2
print(res)
calculate(5, 6)