When planning a vacation, it’s very important to know exactly how much you’re going to spend.

def wages(hours): # If I make $8.35/hour... return 8.35 * hours

The above example is just a refresher in how functions are defined.

Let’s use functions to calculate your trip’s costs.



Define a function called hotel_cost with one argument nights as input.

The hotel costs $140 per night. So, the function hotel_cost should return 140 * nights.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?