Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Practice Error Handling!
You have completed Practice Error Handling!
Preview
Tackle 4 errors using Python's try/except blocks.
This video doesn't have any notes.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
[MUSIC]
0:00
Hi, again, Megan here.
0:00
In this practice session, you're going to
practice catching and handling errors.
0:02
Let's take a look.
0:07
Here, in app.py, you can see I have
four different errors for you to handle.
0:09
The first one,
a string with tree inside of it,
0:15
is trying to be converted to an integer.
0:18
The second one is a float that is
a string trying to be converted to
0:22
an integer as well.
0:26
The third one is a list
with five items in it, and
0:29
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up