MCPcopy Create free account
hub / github.com/ActiveState/code / get_number

Function get_number

recipes/Python/52877_DecisionAnalysis/recipe-52877.py:34–41  ·  view source on GitHub ↗
(prompt)

Source from the content-addressed store, hash-verified

32 return ret
33
34 def get_number(prompt):
35
36 res = None
37 while res is None:
38 try:
39 res = float(raw_input(prompt))
40 except ValueError: pass
41 return res
42
43 # First, ask the user to enter the lists
44 options = get_list("Enter your options:", "Option %d: ")

Callers 4

decisionanalysisFunction · 0.85
ProgramLanguageFinalFunction · 0.85
ProgramLanguageScriptFunction · 0.85
YesNoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected