Code Room
Code reviewMedium
Question
Review this Python function that converts amounts using live FX rates. It is called for every line item on every invoice render, and the rates barely change during a day.
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 to_usd(amount, currency): rates = fetch_rates_from_api() # network call, returns dict by currency return amount * rates[currency]Run or narrate your approach, then ask the coach.