Dave Angel wrote:
def getTotalNumber(prompt):
while True:
try:
numstr = raw_input(prompt)
n = int(numstr)
if 0 < n < 50:#some validation
return n
print "Number is not reasonable, try again"
except ValueErro
2009/5/11 David :
> Hi, I am going through Wesley Chun's book and this is Exercise 8-11;
> Write a program to ask the user to input a list of names, format "Last Name"
> "comma" "First Name". Write a function that manages the input so that
> when/if the user types in the names in the wrong format t
David wrote:
Hi, I am going through Wesley Chun's book and this is Exercise 8-11;
Write a program to ask the user to input a list of names, format "Last
Name" "comma" "First Name". Write a function that manages the input so
that when/if the user types in the names in the wrong format the err
Hi, I am going through Wesley Chun's book and this is Exercise 8-11;
Write a program to ask the user to input a list of names, format "Last
Name" "comma" "First Name". Write a function that manages the input so
that when/if the user types in the names in the wrong format the error
is corrected,