def numeric_input(question, default=0):
    """Ask user for a numeric value."""
    while True:
        answer = input(f"{question} [{default}]: ").strip() or default
        try:
            return float(answer)
        except ValueError:
            pass