M2: Python Fundamentals
Python Fundamentals
Week 2 continued building our foundations in Python by going over the Fundamentals.
The lab had us run Python scripts using Notebook in ArcGIS Pro, working with Strings, using and importing modules, saving Python code as a script with comments, creating loops and conditional statements, and iterating variables within loops to control script workflow.
Again due to my previous experience I was familiar with all of the concepts for this week and working through the exercise prepared me for the Lab Assignment.
I like to keep things very organized so the
output not having labels was throwing me off so I included a few and added a few creative print statements.
On the rubric it said to use the visual semantics of a flowchart to explain your logic so I skipped ahead to Agrawal Chapter 6 to refresh on the flowchart for conditional statements.
For just Step 4 I believe it would be Circle, Diamond, Rhombus, Rectangle, and Circle again.
For my flowchart screenshot needed for this blog - I included what I think the basic Flowchart would look like for Step 3 and Step 4.
I wasn't completely sure how to include all my if statements that branch off.
But a quick scan through some future chapters looks like we will be learning that shortly.
Notes
I have a bad habit of forgetting colons or placing them on the wrong statement.
And since my coding began like many with self-taught coding of their Myspaces and other blogs, I prefer and default to camelCase even though our Textbook and the official Python Style guide prefer underscores.
![]() |
The Duck of Luck |
Comments
Post a Comment