This Python code defines functions to calculate costs for a trip including hotel, rental car, plane ticket, and spending money. It defines functions to calculate the hotel cost per night, plane ticket cost by city, rental car cost by days accounting for discounts of $50 for 7+ days and $20 for 3-6 days, and the total trip cost by calling the other functions and adding spending money. As an example, it prints the total cost for a 5 day trip to Los Angeles.