Thursday, June 11, 2015

Fixing things

 This is the result of running the first code once I had fixed a few syntax errors.  Little things like capitol vs. lower-case letters, or an added letter in a word make a difference, and code won't run if it's incorrect.
 This script had eight errors to fix.  I commented-out all but the top and ran through the code bit by bit, looking at the error messages in the interactive window and correcting the code based on the message.  Some errors were syntax errors, others were problems with objects and functions.
This script shows the result of using a try-except statement to catch an error.  It took a while to get the except message written and placed correctly, but it finally worked.

The lab this week was very helpful, and I'm glad it came earlier on in the course.  I wish I had learned it for last week's lab!

No comments:

Post a Comment