Code Room
Code reviewHard
Question
Review this Python that verifies a posted-then-reversed fee leaves a large account balance unchanged, as an end-of-day integrity check.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
def apply_fee(balance, fee): return balance + fee def reverse_fee(balance, fee): return balance - fee def net_zero(balance, fee): # balance like 1e16, fee like 0.07 after = apply_fee(balance, fee) restored = reverse_fee(after, fee) return restored == balance # net_zero(1e16, 0.07) -> expected TrueRun or narrate your approach, then ask the coach.