in content/artifacts/daytrader_singleServer.py [0:0]
def getValidInput (prompt, defaultValue, validOptions):
validate = 1
while (validate):
print ""
print prompt
retValue = sys.stdin.readline().strip()
if (retValue == ""):
retValue = defaultValue
validate = 0
#endIf
if (validate and validOptions.count(retValue) > 0):
# Is retValue one of the valid options
validate = 0
else:
print "Response not valid"
#endIf
#endWhile
return retValue