Code Room
Code reviewMedium
Question
Review this Python loop that steps through a range by 0.1 and checks for a target.
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 hit_target(start, stop, step, target): x = start while x <= stop: if x == target: return True x += step return False # hit_target(0.0, 1.0, 0.1, 0.3)Run or narrate your approach, then ask the coach.