Answer:
Since the get_seconds function is not given, I'll implement it myself;
The full program (get_seconds and main) written in python is as follows:
def get_seconds(hour,minute,seconds):
seconds = hour * 3600 + minute * 60 + seconds
return seconds
time1 = get_seconds(2,30,0)
time2 = get_seconds(0,45,15)
result = time1 + time2
print(result)
Explanation:
<em>The get_seconds defines hour, minute and seconds as its arguments</em>
This line defines the get_seconds function
def get_seconds(hour,minute,seconds):
This line calculates the second equivalent of the time passed to the function
seconds = hour * 3600 + minute * 60 + seconds
This line returns the the calculated seconds equivalent of time
return seconds
The main starts here
This line calculates the number of seconds in 2 hours and 30 minutes
time1 = get_seconds(2,30,0)
This line calculates the number of seconds in 45 minutes and 15 seconds
time2 = get_seconds(0,45,15)
This line adds both together
result = time1 + time2
This line prints the result
print(result)