Checkpoint Quiz#
Use this quiz to test your understanding so far.
Using the random library and any data structure you think is appropriate, create some data to represent patients. It should include an ID, their age and their systolic blood pressure.
(OPTIONAL CHALLENGE: Instead of randomly selecting the patients age, generate a DoB and calculate their age today.
# Your code here
Calculate some summary statistics for the patients age and blood pressures.
# Your code here
Categorise the blood pressures as “low”, normal”, “pre-high”, “high”.
# Your code here
Count the number of patients for each category of blood pressure.
# Your code here
Group the patients by their blood pressure category and calculate the average age.
# Your code here