Created an anonymous function to hold result

- Created an anonymous function to hold the result of the calculation
determining how long the food will last if the user continues to follow
the same feeding pattern