def get_number(prompt):
            """ get_number(prompt) -> float

    This function prompts for a number.  If the user enters bad input, such as
    "cat" or "3l", it will prompt again.
    """
            res = None
            while res is None:
                    try:
                            res = float(raw_input(prompt))
                    except ValueError: pass
            return res
 get_number(prompt) -> float

    This function prompts for a number.  If the user enters bad input, such as
    "cat" or "3l", it will prompt again.
    
recipes/Python/52877_DecisionAnalysis/recipe-52877.py