Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Function basics
More advanced concepts
Summary

Instruction

Good! Now, it's your turn to write a function with default parameters.

Exercise

Create a function named water_supply that will calculate how many liters a given person would need to drink in their whole life. The function takes two arguments: age (life expectancy for that person) and amount (daily intake of water). Return the number of liters calculated as: age * 365 * amount.

The default parameter values are age=75 and amount=2.

Stuck? Here's a hint!

Start with:

def water_supply(age=75, amount=2):