Write a program that calculates and displays the total travel expenses of a

businessperson on a trip. The program should have functions that ask for and return the following:
� The total number of days spent on the trip
� The time of departure on the first day of the trip, and the time of arrival back home on
the last day of the trip
� The amount of any round-trip airfare
� The amount of any car rentals
� Miles driven, if a private vehicle was used. Calculate the vehicle expense as $0.38 per mile.
� Parking fees (The company allows up to $6 per day. Anything in excess of this must be
paid by the employee.)
� Taxi fees, if a taxi was used anytime during the trip (The company allows up to $10 per
day for each day a taxi was used. Anything in excess of this must be paid by the
employee.)
� Conference or seminar registration fees

To write a program that calculates and displays the total travel expenses, we can break down the problem into smaller functions and then combine the results.

Here's an example solution in Python:

```python
def get_days():
return int(input("Enter the total number of days spent on the trip: "))

def get_departure_time():
return input("Enter the time of departure on the first day of the trip: ")

def get_arrival_time():
return input("Enter the time of arrival back home on the last day of the trip: ")

def get_airfare():
return float(input("Enter the amount of the round-trip airfare: "))

def get_car_rental():
return float(input("Enter the amount of car rentals: "))

def get_miles_driven():
return float(input("Enter the number of miles driven, if a private vehicle was used: "))

def calculate_vehicle_expense(miles_driven):
return miles_driven * 0.38

def get_parking_fees(days):
allowed_per_day = 6
excess_fees = max(0, (days - 1)) * allowed_per_day
return excess_fees

def get_taxi_fees(days):
allowed_per_day = 10
excess_fees = max(0, days) * allowed_per_day
return excess_fees

def get_registration_fees():
return float(input("Enter the conference or seminar registration fees: "))

# Main calculation and display function
def calculate_total_expenses():
days = get_days()
departure_time = get_departure_time()
arrival_time = get_arrival_time()
airfare = get_airfare()
car_rental = get_car_rental()
miles_driven = get_miles_driven()
parking_fees = get_parking_fees(days)
taxi_fees = get_taxi_fees(days)
registration_fees = get_registration_fees()

total_expenses = airfare + car_rental + calculate_vehicle_expense(miles_driven) + parking_fees + taxi_fees + registration_fees

print("\nTotal Travel Expenses:")
print("Days on trip:", days)
print("Departure time:", departure_time)
print("Arrival time:", arrival_time)
print("Airfare:", airfare)
print("Car Rental:", car_rental)
print("Vehicle Expense:", calculate_vehicle_expense(miles_driven))
print("Parking Fees:", parking_fees)
print("Taxi Fees:", taxi_fees)
print("Registration Fees:", registration_fees)
print("Total Expenses:", total_expenses)

# Run the program
calculate_total_expenses()
```

Explanation:

1. We define functions to get user input for each category of expenses: `get_days()`, `get_departure_time()`, `get_arrival_time()`, etc.
2. The `calculate_vehicle_expense()` function is used to calculate the amount for vehicle expenses based on the number of miles driven.
3. The functions `get_parking_fees()` and `get_taxi_fees()` calculate the excess fees based on the number of days.
4. The main function `calculate_total_expenses()` calls each of the input functions to get the necessary values and then calculates the total expenses.
5. Finally, the calculated values are displayed using `print()` statements.

Note: This is just an example solution, and you can modify or enhance it according to your specific requirements.