Module 2 - Python Fundamentals

     This week's module introduced us to methods, functions and conditional for and while loops. We were tasked to fix and create a script that printed our last name from a list, ran a dice game, and created a list of 20 random integers between 0 and 10 and removing a chosen integer from the created list.

 

    I had some trouble with the print function in the third step printing all 20 lines of appending random integers to the list, but I remembered the print function needed to be indented properly for it to only print the final result. 

    Below is the flowchart for my script:


Module 1 - Python Environments & Flowcharts

     This week's module introduced us to the IDLE and ArcGIS Notebooks Python environments. We were required to create a flowchart representing pseudocode to convert 3 radians to degrees using the formula degrees = radians*180/pi.

 

 My original flowchart did not have pi defined, so when the code was tested in IDLE it returned a syntax error. I searched for other methods of defining pi and I liked the method of “import math -> pi=math.pi,” but I ended up using the simpler method of defining pi for my flowchart, and reworked my code and flowchart to include pi=3.1459. 

We were also tasked to read and interpret "The Zen of Python," a set of principles written by Tim Peters. I believe that the Zen of Python places emphasis on simplicity, understandability and readability of code written using Python. The principles “beautiful is better than ugly” and “simple is better than complex” highlight that simple code is better than messy, complicated lines of code. The principle “Explicit is better than implicit” I believe highlights the importance of understandability in code written using Python. A third party should be able to interpret the code written, even without having prior knowledge of the script.

Module 7 - Google Earth

     This final module focused on creating Google Earth maps and tours, as well as converting ArcGIS maps to the KML format. Starting off with a surface water feature layer, I used the "Layer to KML" geoprocessing tool to convert my map into a .kmz file for use in Google Earth. I then imported my converted file as well as the other provided .kmz files into Google Earth.


        I then created a tour of South Florida using the "Record a Tour" button through placemarks I added. I had some trouble navigating Google Earth as I am used to the inverse x and y camera controls.