From the course: Intermediate Python for Non-Programmers
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Try, Except - Python Tutorial
From the course: Intermediate Python for Non-Programmers
Try, Except
- [Instructor] Now in this video, we're going to be learning about something that's not related to classes but is essential for your learning and this is going to be the last video of our section here. And in the next section, we're going to take everything we've learned here and apply it to a really fun project. So, we're just one video away from getting to apply our learning and let's now learn about try and except. And you'll notice that I don't have any of the previous code cuz again, it's not connected to classes or anything there. But the idea here is that sometimes in our Python code, things go wrong, things break. You've seen this probably plenty of times whenever you've made a mistake or seen me make a mistake, we get some big nasty error. So for example, let's say that I want to do some division. I want to take the number four and divide it by zero. This is a big no-no in the math world. So, if I say Python three here and I'm going to do this new try except.py, we get this…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.