# Desktop Python teaching example. Numerical inputs are illustrative.
def speed(distance_m, duration_s):
    if duration_s <= 0:
        raise ValueError("duration_s must be positive")
    return distance_m / duration_s

for trial in range(3):
    print(trial + 1, "forward", speed(0.6, 3.0), "m/s")
    print("stop")
assert abs(speed(0.6, 3.0) - 0.2) < 1e-9
