Lesson 10 of 18 · about 14 minutes
Handling Errors 🛡️
Handling Errors 🛡️ Things go wrong: files go missing, users type letters where numbers should be. Good programs expect that. try: n = int("forty two") except ValueError: print("That was not a number") Multiple exceptions, else and finally try: result = 10 /…
This lesson is part of Pythonaut Pro. The full Launchpad track is free forever, so you can start there and come back.