Code Reading · interview question
What does a strong engineer do when reasoning through first mini project code?
Multiple choiceMediumchapter-1-curatedpremiumcode-readingfirst-mini-project
def preview_shipping(subtotal: float) -> str:
if subtotal >= 100:
return "free shipping"
return "standard shipping"Answer and explanation
Correct answer
D. Narrate the data shape, the state changes, and the exact rule order step by step.
Why
Interviewers often use simple code to test whether you can reason through execution without bluffing.
Test yourself on Code Reading
A free test with instant, explained results. No account needed.
More Code Reading questions
- Which boundary choice best fits first mini project in a maintainable Python system?
- When is first mini project being used in the wrong way?
- Which explanation would best help the team align on first mini project?
- Which option treats first mini project as an engineering policy decision instead of a syntax trick?
- Which option treats dry runs and rule narration as an engineering policy decision instead of a syntax trick?
- What kind of contract clarity matters most for dry runs and rule narration?