Module 1: Python Environments & Flowcharts


For our first week into GIS Programming, we looked a bit into running a script using IDLE, interacting with Python ArcGIS Notebooks and using flowcharts to assist in thinking algorithmically. What I have shared here is a flowchart I created to solve the problem of converting radians to degrees. We were given this formula "degrees = radians*180/pi" and asked to create a flowchart that would illustrate 3 radians to degrees and print the results.





 
Results


We were also tasked with getting the printout of the "The Zen of Python" and then explain what we think it means. I have provided a clip of the "The Zen of Python" and my thought on it.



The “The Zen of Python” is really focusing on simplicity. That you don’t have to add bells and whistles to your coding. The more to the point the better and to keep your coding neat and clean. It rings less is more to me. It emphasizes on keeping your coding to the basis, allowing for pure and truthful coding. The outcome should make things easier not harder.


Notes from this Lab

Part 1 of Lab 1

I retrieved the python script that was already written from the data folder in the schools R drive. I saved the data to my computer and when opening the script in IDLE I changed the command location from the S Drive to my computers C drive, saved changes and then ran the script. 

Part 2 of Lab 1

For question 4 I broke down the steps for converting 3 radians to degrees using the formula                                                    given to me degrees = radians*180/pi.                    Using pseudocode and then flowchart to show the brake down of the script. Using pseudocode, it gives 3 tasks.

 Task 1- Identify your input                                                                                                        Task 2- Identify the goal or objective                                                                                                 Task 3- Create task to meet the objective

Once I finished the flowchart, I ran the script in IDLE to check my work.                                       The readings from Agarwal et al were very helpful when trying to figure out the layout of the flowchart. 


Comments

Popular Posts