(a) Write a function bp(s,d) which takes systolic and diastolic pressure values
ID: 2985710 • Letter: #
Question
(a) Write a function bp(s,d) which takes systolic and diastolic pressure values and returns returns
a list of 2 categorizations (each with a numerical value 0-6). Use a 0 for any invalid inputs!
systolic (mmHg) diastolic (mmHg)
1 Hypotension 0-89 0-59
2 Desired 90-119 60-79
3 Prehypertension 120-139 80-89
4 Stage 1 Hypertension 140-159 90-99
5 Stage 2 Hypertension 160-179 100-109
6 Hypertensive Crisis 180 110
For example, bp(128,98) should return the list [3,4], and bp(-54,32) should return [0,1].