Danny Rosenbaum723 Points
The final code gives an invalid literal error message when using a spelled out number. How do I prevent that message?
I am spelling out a number i.e. "Four" instead of "4" and I am getting an error message that says invalid literal.
Steven Parker186,980 Points
int(tickets_requested)" function converts a string made of digits (like "4") into a number (4). But it does not recognize words and that causes a "valueError" to be raised. Your "except" catches this and returns the message you see.
You can easily change the message (or eliminate it), but if you want to convert a word into a number you will need to use a different function to process the input. There's no built-in for this in Python itself, but some user-created modules can be found online. One example is called word2number.