GIS Programming Week 2
This week, I learned the fundamentals of Python. I used what I learned to correct a script supplied to me, and to write my own. I corrected a script that simulates a game of dice played amongst friends, and wrote a script that displays my name and generates a list of 20 random numbers between 0 and 10. It then removes all instances of the number '7' and reprints the list. I wrote my code for this lab in Python IDLE, as I felt it was the easiest to approach. Messing around with the code and syntax, seeing what works and what doesn’t, was a great exercise that helped me understand the Python language and scripting more clearly. I had only a few troubles, mostly syntax errors that were quickly fixed. It was very satisfying finally getting a line to work after many failed attempts. An example of a mistake I had to troubleshoot was when I established the number ‘7’ as the variable to be removed from the list. I used an if or else clause to determine if ‘7’ showed up in the list and ...