Your question is Add Two Times in Hours Minutes. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Baryons Software Solutions represents elapsed time with objects containing hours and minutes. Implement a function that adds two such time objects and returns the normalized result.
Minutes must be in the range 0 through 59 in the returned object. If the combined minutes reach 60 or more, convert the excess into hours. The result represents a duration, so hours must not wrap at 24.
Implement add_times(time1, time2). Each input is a dictionary with two integer fields: hours and minutes. Return a dictionary with the same fields. The input objects are not modified.
hours and minutes.def add_times(time1, time2):