Python Environments and Flowcharts

 This was the first module in our introductory class into GIS programming. Our task in this lab was relatively simple. All that was required was for us to run a provided python script, the result of which created all of the requisite file folders for the upcoming semester. We simply copied the script from the University of West Florida file database into our personal student drive, opened python, typed the command to open IDLE, and ran the script. 
IDLE is one of the most ubiquitous integrated development environments (IDE) as it comes with python when the program is downloaded. Essentially, this IDE translates the code we create in our scripts into a binary language so our desired functions can be executed either within the IDE itself or a number of software programs we will be utilizing, namely, ArcGIS Pro.

The next task was to create a flowchart. Flowcharts are often used to create a predetermined layout which aides in organizing of our workflow. Since these programs execute algorithmically, it is imperative that our code is properly arranged as to ensure effective execution. 

The problem we were tasked with solving was to create a flowchart on how one would convert 3 radians into degrees. Flowcharts begin with a starting point (start) and end with a finishing point (end). There is a methodology to the shapes which are used, in the instance of beginning and ending our flowchart, ovals are used. These are deemed control and end for a program. It is where we start our script and finish it with the result. 


Next we had to define the variable. Variables are symbolic names used to represent an object in our code, in this instance it was the number (integer) 3. Therefore, the next step in our flowchart would be num=3.

Then in order to convert these 3 radians into degrees, we need the formula for the conversion which is degrees = radian * 180/pi. In this instance our radian is defined as num. 

Before we type the formula into our script, we have to define pi. I found the module for pi in python language online and it is math.pi. This would be the next step in our flowchart. Defining instances, known as assignment statements, are represented with a rectangle. 

We then enter the formula into our code and this resides in a subsequent rectangle. 

Finally, to print our answer, we simple type print degrees. This is an input > output function and is represented in a flowchart by a parallelogram.  

The flowchart is then capped off with the end of the function which once again resides in an oval. 

Below is the flowchart I created. 

Comments