Skip to main content
🔒 Preview mode. The first 15 Foundations lessons are free; this one is Pro. Start a 7-day trial to unlock the editor, AI hints and the rest of the curriculum. Card required, cancel any time in Dashboard.Start 7-day trial →
← CoursesSystem Design for Python JuniorsModule 1 · System Design FundamentalsLatency numbers every engineer should knowpredict3 / 105
+75 XP
Task
📝 **Task:** Predict the verdict the snippet prints. The budget is 100 ms total; the three operations are summed and compared. 📋 Implement the function above. Tests run automatically. 💡 **Hint:** Re-read the theory if you get stuck.
Predict the output

Read the code carefully

# Endpoint budget: 100 ms.
# Three operations the request must do:
#   - 50 SSD reads   @ 10 µs each   = 50 * 0.010 ms
#   - 100,000 RAM    @ 100 ns each  = 100_000 * 0.0001 ms
#   - 1 cross-region DB call        = 150 ms (US→EU)

ssd_total_ms          = 50 * 0.010
ram_total_ms          = 100_000 * 0.0001
cross_region_ms       = 150

total_ms = ssd_total_ms + ram_total_ms + cross_region_ms
print("over" if total_ms > 100 else "ok")

# What does this print? Type your prediction.

What will the program print? Write here:

💬 Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…