-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgezondheidscheck.py
45 lines (38 loc) · 1.27 KB
/
gezondheidscheck.py
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
"""
Name: Robin Groot
Version: 1.0
Inputs: Heartbeat, Temperature, Pressure
Outputs: If you are sick or not?
Description: Tells you if you are sick or not based on your inputs?
"""
# Initialising variables
min_heart = 55
max_heart = 90
min_temp = 36.3
max_temp = 37.5
min_pressure = 100
max_pressure = 140
list_bool = []
def between():
# Asking for your
heart = int(input("What is your heartbeat?"))
temp = int(input("What is your temperature?"))
pressure = int(input("What is your pressure?"))
# Make lists containing the inputs and initialised variables
cal_heart = [min_heart, heart, max_heart]
cal_temp = [min_temp, temp, max_temp]
cal_pressure = [min_pressure, pressure, max_pressure]
cal_list = [cal_heart, cal_temp, cal_pressure]
# Makes list with True or false
for item in cal_list:
if item[0] <= item[1] <= item[2]:
list_bool.append(False)
else:
list_bool.append(True)
# Tells you if you are sick or not based on True or False
if list_bool[0] == False and list_bool[1] == False and list_bool[2] == False:
print("You are not sick")
else:
print("You are sick")
# Calls the function that tells you if you are sick based on your input.
between()