0 of 6 problems solved • 0%

Exercise prompt

Split a Duration

The expression (a, b) makes a tuple of two values. Putting the whole hours first gives callers a predictable order for unpacking.

Example

def book_ends(word): return (word[0], word[-1]) first, last = book_ends("north") print(first, last) # n h

The tuple carries two answers in a documented order. Each caller can unpack both with one assignment.

Your task

Return a pair containing whole hours and remaining minutes for a nonnegative integer number of minutes.