Thursday, May 28, 2015

Mod2 - Last Name script

 
 
 
This week's task was to write a script. The screenshot above shows the result.  To make the script, several steps were taken which allowed us to practice some of the functions and methods we learned in this week's lecture and exercise, including writing a string, splitting it and creating a list, printing one item on the list using indexing, finding the length of my last name, and multiplying that number by 3.

Slowly, the fundamental concepts from this week's lesson are sinking in, and this lab was excellent practice.  It's certainly a challenge, but there is something satisfying when it works after trial and error.  The most frustrating thing is PythonWin, which refuses to do anything but flash briefly on the screen.  A nice person at the Help desk clued me in to a quick fix, which is to type wait = input ("PRESS ENTER TO CONTINUE) as the last line of code.  That's the only way I could test my script in PythonWin and see the result, or get a screenshot.  The Help desk person couldn't figure out what was going on with PythonWin, even by going on my computer remotely.  Apparently this is not an uncommon problem, since I found quite a bit on it by doing a quick web search.

No comments:

Post a Comment