-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDay01.py
More file actions
28 lines (24 loc) · 748 Bytes
/
Copy pathDay01.py
File metadata and controls
28 lines (24 loc) · 748 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
#Exercise 1
#1.1
import math
math.pi
math.pow
radius = float(input('Enter Radius: '))
volume = (4 / 3) * math.pi * (float(math.pow(radius, 3)))
print(round(volume, 2))
#1.2
copies = float(input("Number of Books Are You Ordering: "))
CPOB = round(((24.95 * .6) + 3) + ((24.96 * .6) + .75 * (copies - 1)),2)
print("The Total Cost is ${:.2f}" .format(CPOB))
#1.3
start = (6*60+52)*60
easy = (8*60+15)*2
fast = (7*60+12)*3
finish_hour = (start + easy + fast)/(60*60.0)
finish_floored = (start + easy + fast)//(60*60)
finish_minute = (finish_hour - finish_floored)*60
print('Finish time was %d:%d' % (finish_hour,finish_minute))
#1.4
grade = ((89 / 82) - 1)
print("You grade went from 82 to 89:")
print('Your grade went up {:.2f}%' .format(grade))