Skip to content
Sharp

Control Flow · interview question

Which naming or modeling choice is strongest for branching policies?

Multiple choiceMediumchapter-2-curatedpremiumcontrol-flowbranching-policies
python
if is_vip and subtotal >= 100:
    discount_rate = 0.15
elif subtotal >= 75:
    discount_rate = 0.05
else:
    discount_rate = 0.0
Choose one answer
Answer and explanation

Correct answer

D. Use names and structures that describe the business fact directly instead of temporary implementation noise.

Why

Clear naming and modeling shorten debugging, review, and onboarding time.

Test yourself on Control Flow

A free test with instant, explained results. No account needed.

Start free test
All Control Flow questions →