-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMachineproject2.py
More file actions
36 lines (28 loc) · 1.51 KB
/
Machineproject2.py
File metadata and controls
36 lines (28 loc) · 1.51 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
x0 = ' Zombie Protection System'
bubble = '*' * len(x0)
print('{0}{0}{0}\n{0}{1}{0}\n{0}{0}{0}'.format(bubble,x0))
print(' Fatima Hameed.\n ****************\n Part of a group who teamed up to generate a program to save the world\n *************************************************************************************************=========================')
x1 ='We will calculate your foraging missions '
bubble2 = '=' * len(x1)
print('{1}{0}'.format(bubble2,x1))
weight = float(input("Enter survivor's weight: "))
intensity = float(input("Enter the intensity of activity: "))
time = float(input("Enter the minutes of activity: "))
calories = float(input("Enter the number of calories available in food: "))
def basel(weight):
return (weight/2.2) * 24.2
def calrequired(intensity,weight,time):
return 0.0385 * intensity * weight * time
x =calrequired(intensity,weight,time)
totalenergy = (basel(weight)+x)/0.9
serve = totalenergy/calories
print('For the activity, the survivor will need %.0f Calories' %(totalenergy))
print('To maintain their weight, they will need to consume %.0f serving of food' %(serve))
print("---------------------------------")
print("---------------------------------")
print("---------------------------------")
print('Thank you for using our zombie protection system')
print("------------------------------------------------")
x3 = 'STAY SAFE, DONT GET EATEN BY VAMPIRE ZOMBIES'
bubble3 = '*' * len(x3)
print('{0}{0}{0}\n{0}{1}{0}\n{0}{0}{0}'.format(bubble3,x3))