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.