Quiz 1¶

Task - geographic coordinates in GPS format
You found an old map of buried treasure and read the coordinates of the treasure in degrees, minutes and seconds. However, your GPS device only supports geographical coordinates in degrees as real numbers (floats).
Write a program that for a given coordinate in degrees, minutes and seconds, prints a real number of degrees.
The program is almost completely written. An expression needs to be added to calculate the real number of degrees. To convert the (angular) minutes into degrees, we divide them by \(60\), and we convert the seconds into degrees by dividing by \(60 \cdot 60 = 3600\).

Task - Geographic coordinates in the format for the old map
After you realized that the old map from the previous assignment was a joke, you decided to prank someone in a similar fasion. You have selected a nearby location and read coordinates from your GPS device. Now you need to convert the coordinates from the device in real degrees into whole degrees, whole minutes and rounded seconds, to create a proper “old” map.
Complete the started program that performs this conversion.

Task - Plumber:
Mike is a plumber and has three interventions planned for today. For each intervention, Mike will record when it began and when it ended. Based on that information it should be calculated how long Mike spent on the interventions.
A partially written program is given that loads the start and end times in hours and minutes for each Mike’s intervention, and then determines and prints the total duration of all interventions.
Complete the program by writing the duration(h1, m1, h2, m2) function, which calculates how many total minutes elapsed from h1 hours and m1 minutes to h2 hours and m2 minutes.