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
return 140 * nights.