Predict the output
What do the two lines print?
arrival_rps = 200
time_in_system_s = 0.25
in_flight = arrival_rps * time_in_system_s
print(in_flight) # requests being served at any moment
per_worker_rps = 1 / time_in_system_s
print(arrival_rps / per_worker_rps) # workers needed at 100% busyHint 1 of 1
L = λ × W
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A 50.0 then 50.0
Correct. 200 × 0.25 = 50 in flight; each worker handles 4 per second, so 50 workers.
Little's law says L = λ × W: 200 per second × 0.25 s gives 50 requests in flight. One worker finishes 4 a second, so 50 workers keep up only at 100% busy.
Why not the others?
- B
50.0then4.0. 4 is each worker's rate, not the worker count. - C
800.0then50.0. Multiply rate by time, don't divide. - D
200then50. These are float divisions and products.