Applications of functions in real-life situations