0 of 6 problems solved • 0%

Exercise prompt

Convert to Minutes

A function definition names a calculation without running it. Each call binds its arguments to the parameters and evaluates the body.

Example

def cost(quantity, price): return quantity * price print(cost(3, 5)) # 15

The values 3 and 5 become the local names quantity and price. Returning the product lets print display it.

Your task

Define to_minutes(hours, minutes). Return the total duration in minutes. One hour has 60 minutes.