This week we created a basic script, the end of result of which shows my last name and the number of letters in my last name times three.
To write the script I first had to define what my name was... this then was split into a list. From this I was then able to separate out my last name, and derive the total count of letters in my last name using the len function. Once I had this information I was able to write a statement multiplying the total last name letter count - the results of which you can see below.
The script, while short, was really the result of several false starts. After reviewing the textbook and the lab exercise several times I was able to finally produce something that should work with names other than mine, and can actually be run in PythonWin. This was quite the learning experience, and I am very happy with my results.
Screenshot of script results. |
No comments:
Post a Comment