Python Environments & Flowcharts Module 1
The first week of class has been focused on getting familiar with general information about Python. We looked at two different Python interpreters Integrated Development and Learning Environment (IDLE) and ArcGIS Notebooks and how they read and execute Python code. IDLE has two main window types the shell window and the editor window. ArcGIS Notebooks provide a space to edit, write, document, and run Python code within ArcGIS Pro. With ArcGIS Notebooks you can easily incorporate Python and maps together. Using a prewritten script that was run through IDLE folders and subfolders for the course were created.
We were also tasked with using code to print and then interpret The Zen of Python by Tim Peters. Which gives a set of guiding principles in writing effective and readable Python code. A few of the set of guidelines it emphasizes include simplicity, clarity, and readability. When handling errors they should not be ignored unless purposeful. If you run into an issue do not guess, Python encourages a clear approach to solving problems. If the code is hard to explain there should be a better way for it to be done. By using the principles outlined within the text the code should be logical and maintainable.
Another topic discussed this week was flowcharts and how they can be a good visual representation. A flowchart was created for the formula degrees = radian*180/pi, where radian = 3. The flowchart illustrates converting 3 radians to degrees and to print result.
Comments
Post a Comment