-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
72 lines (69 loc) · 1.25 KB
/
Copy pathtest.py
File metadata and controls
72 lines (69 loc) · 1.25 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
# 1
print("Program 1")
x = 18
y = 20
print("Sum" ,x+y)
print("Substraction" ,x-y)
print("Multiplication" ,x*y)
print("Division" ,x/y)
print()
# 2
print("Program 2")
a= 15
b = 4
print("Floor division", a//b)
print("Remindra", a%b)
print()
# 3
print("Program 3")
pen= 15
notebook = 40
print("Total cost", 3 * pen + 2 * notebook)
print()
# 4
print("Program 4")
a = (32,35,5,768,98)
sum = 0
for i in a:
sum += i
print("Average of no" ,sum / len(a))
print()
# 5
print("Program 5")
no = 4
pow = 5;
print("Squre", no**2)
print("Cube", no**3)
print("Nth power", no**pow)
print()
# program 6
print("Program 6")
second = 4355353;
min = second//60;
remSec = second %60
print(second, " into minuts: ", min, " and second ", remSec)
print()
#program 7
print("Program 7")
dist = 120
hour = 3;
print("Average speed: ", dist / hour)
print()
print("Program 8")
first =545
second = 53
if(first % second == 0):
print(first, " is a multiple of ", second, "True")
else:
print(first, " is not a multiple of ", second, "False")
print()
print("Program 9")
principle = 10000
rate = 10
time = 5
print("Simple of this amount ", principle, " at rate ", rate, " for time ", time, " is ", (principle* rate * time)/100)
print()
print("Program 10")
a = 24.4
b = 12.2
print("Floor division ", a//b)