Lesson 2 covers Python fundamentals (many of which are common to other programming languages) and gives you a chance to practice these in a project. To complete this lesson, you are required to do the following:
- Download the Lesson 2 data and extract it to C:\PSU\Geog485\Lesson2.
- Work through the online sections of the lesson.
- Read the remainder of Zandbergen chapters 4-6 that we didn't cover in Lesson 1 and chapter 7.1 - 7.5, and 7.11 (in the Python 3 version of the book) or 11.1 - 11.5 and 11.11 (in the Python 2 version of the book). In the online lesson pages, I have inserted instructions about when it is most appropriate to read each of these chapters. There is more reading this lesson than in a typical week. If you are new to Python, please plan some extra time to read these chapters. There are also some readings this week from the ArcGIS Help.
- Complete Project 2 and upload its deliverables to the Lesson 2 drop box. The deliverables are listed in the Project 2 description page.
- Complete the Lesson 2 Quiz.
Do items 1 - 3 (including any of the practice exercises you want to attempt) during the first week of the lesson. You will need the second week to concentrate on the project and quiz.
By the end of this lesson you should:
- understand basic Python syntax for conditional statements and program flow control (if-else, comparison operators, for loop, while loop);
- be familiar with more advanced data types (strings, lists), string manipulation, and casting between different types;
- know how to debug code and how to use the debugger;
- be able to program basic scripts that use conditional statements and loops to automate tasks.