Error handling in "Learn Lambda Functions by Building an Expense Tracker"

There doesn’t seem to be any error handling in this module:

and so I entered lk for the amount, to see what would happen:
image
As you see nothing happened but I couldn’t enter anything else or end the program.

Here are some ways you can work on,

  1. Use try-except blocks to catch errors
  2. Use data validation techniques to ensure that only valid input is entered
  3. Check out some validation system can track different types of errors

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.