Question: I have a homework assignment that requires me to create a program that will calculate the DMS(Degree-Minute-Second) conversion from a user input of decimal degrees.

I have a homework assignment that requires me to create a program that will calculate the DMS(Degree-Minute-Second) conversion from a user input of decimal degrees. I've tried to using my notes and some online support to create this program, but I'm having some trouble understanding the examples and what I am coding incorrectly. Could someone please help me? Thanks for your help in advance

I have a homework assignment that requires me to create a program

that will calculate the DMS(Degree-Minute-Second) conversion from a user input of decimal

1 print("This program will calculate the DMS conversion from a user input of decimal degrees.") #DMS Assignment 2 DD = float(input("Please input a decimal degree: O Decimal degree to later be input by user 3 D = int(degrees) 4 M = int(minutes) 5 S = int(seconds) 6. DD - float(degrees) + float(minutes)768 + float(seconds)/(3608) def dms2dd(degrees, minutes, seconds, direction): dd = float(degrees) + float(minutes)/60+ float(seconds)/(60*60); if direction == 'E' or direction == 'N': dd += -1 return dd; NNE OWOCOWN def dd2dms (deg): d = int(deg) md = abs(deg - d) * 60 m = int(md) sd = (md - m) * 60 return [d, m, sd] def parse_dms (dms): parts = re.split('[^\d\w]+', dms) lat = dms2dd(parts[@], parts[1], parts[2], parts [3]) return (lat) dd = parse_dms ("7855'44.33324"N ) print(dd) Shell >>>

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 Databases Questions!