🌴🏖️🌴
Objective:
Write a program that helps a user plan their holiday by collecting trip details, calculating total costs, and displaying a summary.
Requirements:
Inputs (User Data):
Ask the user to input the following information:
Their destination (string)
The number of days they plan to stay (integer)
The cost of accommodation per night (float)
The cost of daily food (float)
The cost of return flights (float)
Processing / Sequencing:
Calculate:
Total accommodation cost = number of days × cost per night
Total food cost = number of days × daily food cost
Overall holiday cost = accommodation + food + flight
Use appropriate data types:
Strings for destination
Integers for number of days
Floats for prices and costs
Output:
Display a friendly summary of the trip plan.
Example output:
--- Holiday Summary ---
Destination: Japan
Duration: 7 days
Accommodation cost: $843.50
Food cost: $315.00
Flight cost: $800.00
-------------------------
Total holiday cost: $1,958.50
Have a great trip to Japan!
Extension (Optional Challenges):
Add a currency converter (e.g. ask user for exchange rate).
Let the user input multiple destinations and compare costs.
Format the total cost to 2 decimal places.