Question: * Create a python solution that reads a file containing angles in degrees, minutes, seconds format ( DD MM ' SS ) , converts

*Create a python solution that reads a file containing angles in degrees, minutes, seconds format (DDMM'SS"), converts the value to a decimal degree value, then write the values to a file.
*To simplify you code, you will need to create the following functions:
*ParseDegreeString(ddmmss)- inputs a location value and returns the degrees, minutes, and seconds
*Inputs
ddmmss - inputs a string in the form of ddmm'ss" and returns the degrees, minutes, and seconds
*Returns
Degrees - Floating Point
Minutes - Floating Point
Seconds - Floating Point
*Logic
Find the degree symbol (chr(176))- degrees are between the beginning of the string and the position of the degree symbol.
Find the minutes symbol (')- minutes are between the degree symbol and the minute symbol
Find the seconds symbol(")- seconds are between the minutes symbol and the seconds symbol
Return the degrees, minutes, and seconds as floating point
*DDMMSStoDecimal(degrees, minutes, seconds)- inputs degrees, minutes, and seconds and converts to a decimal value
*Inputs
Degrees - Floating Point
Minutes - Floating Point
Seconds - Floating Point
*Returns
Decimal Degrees - Floating Point
*Logic
There are 60 minutes in a degree and 3600 seconds in a degree. Calculate the decimals degrees as degrees plus minutes divided by 60 plus seconds divided by 3600.
*Copy, paste and save the file below as07.Project Angles Input.txt
5500'00"5530'00"5559'59"5560'00"5600'00"50'0"
Expected Output
6 records processed
*Expected07.Project Angles Output.txt
55.055.555.99972222222222556.056.05.0
Insert a picture of code thank you

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!