Question
Using python write a code that follows the Prompt and Data: You are a hospital administrator responsible for staffing the ER. The following is a
Using python write a code that follows the Prompt and Data:
You are a hospital administrator responsible for staffing the ER. The following is a list of the number of people in the ER waiting room each hour over a 24 hour period (i.e the first measure is at 12am, the second at 1am etc) for 28 days starting on a Sunday (i.e the first list covers the 24 hours of Sunday, the second the 24 hours of Monday)
The hospital staffs on 3 shifts:
Shift #1: 12am - 8am
Shift #2: 8am - 4pm
Shift #3: 4pm - 12am
In this assignment you are to determine and output the following for each shift on each day of the week:
average number of people in the waiting room
highest number of people in the waiting room
lowest number of people in the waiting room
range of the number of people in the waiting room
NB: You will output 82 values (7 days * 3 shifts * 4 measures). Your output should be appropriated titled ie by shift number and day of the week.
The data you are to use in your analysis is:
data = [[41, 12, 43, 25, 39, 16, 13, 20, 10, 22, 34, 44, 40, 12, 14, 20, 10, 21, 28, 44, 5, 30, 7, 18], [22, 29, 50, 36, 12, 27, 25, 26, 23, 37, 45, 20, 14, 43, 48, 9, 18, 44, 20, 21, 50, 44, 6, 16], [50, 7, 37, 36, 5, 12, 23, 15, 13, 9, 33, 21, 22, 24, 45, 29, 44, 31, 44, 21, 29, 33, 31, 21], [38, 14, 7, 50, 14, 31, 32, 32, 41, 7, 50, 50, 32, 18, 19, 26, 17, 48, 20, 41, 40, 47, 33, 27], [30, 47, 17, 34, 35, 29, 20, 29, 41, 45, 23, 18, 10, 35, 17, 26, 19, 15, 15, 35, 6, 24, 48, 34], [11, 38, 48, 8, 44, 14, 19, 46, 50, 21, 31, 48, 28, 38, 33, 41, 26, 43, 50, 34, 20, 8, 20, 5], [43, 34, 22, 20, 37, 29, 40, 28, 17, 32, 32, 7, 29, 18, 31, 6, 22, 14, 9, 33, 5, 36, 40, 16], [15, 13, 46, 36, 35, 8, 23, 15, 27, 35, 17, 33, 40, 26, 45, 9, 32, 37, 25, 26, 41, 47, 27, 22], [43, 35, 38, 34, 21, 18, 13, 6, 6, 47, 13, 41, 43, 46, 40, 5, 17, 10, 10, 10, 36, 19, 24, 12], [38, 43, 40, 12, 45, 17, 34, 26, 16, 30, 12, 46, 33, 37, 5, 18, 48, 29, 48, 26, 36, 38, 11, 15], [37, 21, 7, 22, 23, 43, 29, 24, 42, 16, 45, 16, 43, 5, 37, 12, 46, 9, 44, 22, 19, 34, 39, 13], [50, 39, 8, 48, 23, 34, 13, 46, 19, 42, 20, 17, 31, 34, 10, 22, 42, 48, 32, 21, 29, 47, 21, 44], [26, 32, 34, 24, 31, 32, 32, 36, 42, 22, 48, 8, 19, 38, 17, 36, 41, 14, 34, 44, 30, 19, 30, 50], [17, 28, 45, 49, 34, 21, 48, 38, 43, 31, 37, 21, 40, 22, 16, 39, 37, 29, 46, 25, 35, 27, 27, 49], [11, 7, 45, 18, 49, 8, 11, 37, 36, 38, 32, 10, 41, 34, 32, 24, 23, 18, 43, 47, 16, 6, 28, 32], [42, 6, 42, 47, 30, 15, 5, 33, 17, 20, 5, 47, 20, 27, 22, 43, 14, 39, 6, 45, 21, 48, 27, 22], [47, 20, 24, 18, 21, 6, 34, 30, 33, 9, 43, 21, 23, 10, 35, 23, 35, 33, 29, 16, 38, 45, 40, 38], [31, 6, 8, 11, 36, 8, 25, 24, 47, 7, 30, 14, 22, 32, 45, 22, 21, 12, 16, 30, 17, 21, 36, 24], [40, 32, 10, 26, 18, 17, 35, 11, 47, 20, 36, 7, 16, 37, 30, 8, 40, 41, 13, 45, 13, 30, 29, 14], [22, 35, 42, 6, 26, 11, 7, 42, 6, 16, 6, 21, 32, 38, 21, 37, 39, 30, 13, 43, 49, 29, 21, 45], [33, 46, 44, 11, 15, 21, 34, 8, 46, 50, 33, 34, 9, 16, 42, 50, 31, 19, 29, 14, 17, 27, 42, 10], [11, 40, 24, 47, 8, 37, 21, 12, 21, 25, 11, 37, 24, 22, 37, 19, 45, 32, 20, 23, 45, 9, 49, 24], [37, 20, 40, 48, 6, 13, 31, 40, 45, 26, 48, 11, 38, 31, 45, 36, 8, 45, 50, 45, 16, 37, 48, 17], [8, 38, 42, 32, 35, 20, 24, 19, 19, 23, 13, 47, 15, 15, 20, 13, 26, 33, 49, 19, 11, 5, 44, 38], [48, 5, 28, 43, 32, 15, 34, 23, 20, 16, 9, 37, 23, 10, 29, 5, 24, 16, 20, 29, 19, 46, 24, 23], [24, 19, 27, 5, 30, 17, 44, 19, 38, 50, 40, 5, 8, 18, 14, 36, 47, 11, 31, 50, 44, 37, 33, 5], [9, 28, 45, 44, 9, 23, 27, 11, 31, 32, 31, 31, 14, 8, 25, 27, 8, 22, 33, 27, 25, 26, 50, 30], [28, 23, 44, 38, 24, 21, 11, 26, 32, 6, 35, 17, 13, 29, 10, 29, 18, 19, 20, 11, 13, 37, 18, 11]]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started