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 →
← CoursesFastAPI ProductionModule 6 · Real-World PatternsSentry integration + samplingpredict96 / 105
+125 XP
Task
📝 **Task:** Predict the output. `daily_traces` multiplies requests-per-second by the sample rate by seconds-in-a-day, then truncates to int. The test passes rps=5000, traces_sample_rate=0.05. 📋 Implement the function above. Tests run automatically. 💡 **Hint:** Re-read the theory if stuck.
Predict the output

Read the code carefully

def daily_traces(rps, traces_sample_rate):
    return int(rps * traces_sample_rate * 86_400)

print(daily_traces(5_000, 0.05))
print(daily_traces(5_000, 0.10))
print(daily_traces(100, 1.0))

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…