// quiz
Python for ops check
~12 min
Ten questions on the Python every operations engineer uses.
Answer all questions. You need 70% to pass and complete the course step.
Pass mark: 70% · 10 questions
1. What does f"cpu={cpu:.0f}%" do when cpu = 87.5?
2. Safest way to read a key that might be missing from dict d?
3. What does line.split()[2] return for '2026-08-12 10:31 ERROR db down'?
4. Why open files with `with open(...) as f:`?
5. json.load vs json.loads?
6. What exit code should an ops script use to make CI fail?
7. [s['name'] for s in fleet if s['cpu'] > 80] is called a…
8. In a retry loop, why grow the delay each attempt (backoff)?
9. Select ALL true statements about virtual environments:
10. How do you read a Python traceback?
Sign in to submit.