Writing and evaluating a function that models a real-world situation - Advanced