From the course: Python Practice: Real-World Coding Challenges
Unlock this course with a free trial
Join today to access over 25,500 courses taught by industry experts.
Challenge: The trouble with scribbles - Python Tutorial
From the course: Python Practice: Real-World Coding Challenges
Challenge: The trouble with scribbles
(upbeat music) - While we've made the user interface as nice as possible for our users, the scribe in Canvas classes are still pretty fragile and very forgiving of things like bad user input. For instance, what if a user tries to make a scribe a color that we can't handle? What if the mark or trail they enter is a very long string? What if they enter some random, non-numeric garbage for the frame rate or the degrees? Also, despite our best and most careful programming, there may be situations we hadn't encountered, resulting in something being written out of the bounds of the canvas and sending the program crashing into a fiery blaze. Create a set of custom exceptions that will let the user know exactly what they did wrong and how to fix it. Also, examine all the failure points of the program and add exception handling and potentially an appropriate recovery for those as well. No pressure, but I'm expecting something truly…
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.