0
0
AI for Everyoneknowledge~30 mins

AI for travel planning and itineraries in AI for Everyone - Mini Project: Build & Apply

Choose your learning style9 modes available
AI for Travel Planning and Itineraries
📖 Scenario: You want to plan a trip using AI tools that help organize your travel details and create an itinerary.
🎯 Goal: Build a simple step-by-step travel plan using AI concepts to organize destinations, dates, and activities.
📋 What You'll Learn
Create a list of travel destinations with exact names
Add a variable for the trip duration in days
Use a loop to pair each destination with a day number
Complete the itinerary by adding a summary statement
💡 Why This Matters
🌍 Real World
Travel planners and apps use AI to organize trips by managing destinations, dates, and activities efficiently.
💼 Career
Understanding how to structure travel data and use loops and variables is foundational for roles in travel technology and AI-assisted planning.
Progress0 / 4 steps
1
Create the list of travel destinations
Create a list called destinations with these exact city names: "Paris", "Rome", "Berlin", "Amsterdam".
AI for Everyone
Hint

Use square brackets [] to create a list and separate city names with commas.

2
Add the trip duration variable
Create a variable called trip_days and set it to 4 to represent the total number of days for the trip.
AI for Everyone
Hint

Use a simple assignment to create the variable trip_days.

3
Pair each destination with a day number
Use a for loop with variables day and city using enumerate(destinations, 1) to pair each city with its day number. Inside the loop, create a string entry in the format "Day {day}: {city}".
AI for Everyone
Hint

Use enumerate starting at 1 to get day numbers and format the string with f-strings.

4
Add a summary statement for the itinerary
After the loop, create a variable called summary and set it to the string "Your trip covers 4 days and 4 cities." using the trip_days variable.
AI for Everyone
Hint

Use an f-string to include trip_days and the number of destinations in the summary.