Join Barron Stone for an in-depth discussion in this video Validate external input, part of Programming Foundations: Real-World Examples.
- Time to finish cleaning up the house.…I like to put on a little music when I clean.…And Olivia, there's a few more dishes in the dishwasher.…Do you mind starting that?…- Sure.…- Thanks.…I'll just stay in here and vacuum at the living-room.…Looks like we ran into another error.…Unfortunately, I have no idea what caused this…or why this problem occurred.…Just knowing that something's wrong…doesn't help me to figure out what I need to do to fix it.…
When an error occurs…the source of that error should raise an exception…and pass along information about the problem…so the program can do something to handle the error.…- Apparently, this was the dishwasher.…I think we tripped the curcuit.…- Ah, thanks.…Now that you know an error has occurred…and the reason for the problem…you can do something to handle it.…To demonstrate this scenario,…I've created a class to simulate a circuit breaker…in this script called start_11_02_circuit_breaker.…The circuit breaker class has two properties:…capacity, which is the maximum amount of amps…
- Reusing functions
- Local vs. global variables
- Creating and naming custom objects
- Class inheritance
- Modules and packages
- Multidimensional lists and tuples
- Queues and stacks
- Creating and combining sets
- Storing data in dictionaries
- If/else and switch statements
- For vs. while loops
- Error handling
- Polling and event-driven programming
Skill Level Beginner
3. Class Inheritance
4. Modules and Packages
5. Lists and Tuples
6. Queues and Stacks
9. Conditional Execution
11. Error Handling
12. Polling and Event-Driven Programming
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.