Programming Module 1 Blog post

 

Programming Module 1


In my first module for this class we learned a lot of information about the basics of Python coding language and Integrated Development Environments (IDE's) as well as creating workflows for scripts that I am planning on writing. 

The work flow process is going to be extremely helpful in the future as I learn to write more complex code and longer commands. Even in this introductory lesson, creating a workflow for Question 4 in the lab process summary helped me visualize the problem and how to accomplish the task. 

    Below I'll be providing the Question 4 problem and two images to help explain my process.

   The initial data is as follows,  Degrees = Radians*180/pi 

   Problem: How many degrees are 3 Radians

    Before I begin my process, I guess there are two schools of thought when it comes to how define Radians if we are actually solving for three of them. 

Either I could write script that defined radians as (1) and then proceeded with defining pi and degrees, after which I could multiply the result by three. 

Instead I chose to shorten the process by just defining radians as (3) and then defining pi as 3.14 and finally defining degrees as Radians(3) times 180 divided by pi(3.14) 

    Below is my flow chart created in this very helpful Flow Chart that is free to use. 


















Next, I'll provide the actual script that I wrote in IDLE which is a shell that Esri software can recognize with certain manual installation steps in the package manager.



One last step I took to double check the correct output  of 171.9745 was to go back and re-run the script with radians defined as 3.0 instead of 3  which resulted in the same answer when I printed the command with both versions of defined radians.

I'm definitely excited for the next module as I suspect there will be more complex commands to learn and implement. 






Comments

Popular Posts