September 2010
Intermediate to advanced
440 pages
9h 23m
English
Just because user input is not valid, it does not mean we should scrap it and ask the user for a new input. Rather, we can accept an entire statement, assign what values will fit and come back to the user to correct data that will not.
To do this, we need to import the string module and define three functions to do the following:
name column.price column.After defining the functions, we pass the user values to the first two functions, we then pass the user values in turn to the first two functions which then calls the third function only if the data does not check out.
Simply append string to the import line for the program or add the following line below ...
Read now
Unlock full access