Posts

Showing posts from May, 2023

Python Fundamentals

Image
This week in GIS Programming, we learned about the basics of Python, including working with string variables, function and method calls, importing modules, running and saving Python script using Notebook in ArcGIS Pro, including comments in scripts, creating loops and conditional statements, and using iterate variables within loops to control script workflow. In this activity assigned, I split and printed my full name, I fixed errors in a pre-written code for a dice game, which was ran, created a loop that added 20 random numbers between 0 and 10 to a list, then created a loop that removed a chosen integer from this list, and concluding with printing statements on the outcome of the random number selected, the instances of its occurrence, and an updated listed without the chosen number.    This flowchart shows the workflow for the activity:      This screen shot shows the output of the script I wrote:     I found this lab challenging and time intensive, but overall, I feel that it he

Python Environments and Flowcharts

Image
This week is GIS programming, I learned the basics of pseudocode, flow charts, and the Python programming language. For the exercise, I interpreted my first snippet of Python syntax by using the Python command prompt in the ArcGIS virtual environment.   I then created and ran my first Python script using IDLE to interpret the same syntax from the previous task “Hello World.”   Next, I learned about ArcGIS notebook by using the “Hello World” syntax.   Finally, I created a flow chart to depict the workflow for scripting and interpreting the “Hello World” syntax and then exporting it as a .PNG. Following this, I began the Module 1 activity where I was tasked with scripting a code and developing a flowchart for converting 3 radians to degrees. I scripted the code to convert 3 radians to degrees in IDLE and used Zen Flowchart to produce a .PNG of the latter task:     Then, I scripted a code to convert 3 radians to degrees in IDLE: In addition, we were requested to read and provide o