Question: Travel Planner Application Create a Travel Planner application that manages information about different destinations, handles user inputs, manipulates data, performs calculations, and stores / retrieves
Travel Planner Application
Create a Travel Planner application that manages information about different destinations, handles user inputs, manipulates data, performs calculations, and storesretrieves data from a MySQL database.
Initialize an empty dictionary to store destinations like destinations
Implement Following functions:
Function to add a new destination to the planner: Adds a new destination to the travel planner dictionary. Takes user input for destination details like name, country, population, and landmark. Handles population input exceptions if the input is not a number.
Function to display all destinations: Displays all destinations stored in the dictionary in a formatted manner.
Function to calculate average population of all destinations: Calculates and displays the average population of all destinations using NumPy.
Function to save destinations to MySQL database: Connects to a MySQL database and saves all destinations from the dictionary to the database. Handles connection errors and database operation errors using exception handling.
Function to retrieve destinations from MySQL database: Connects to a MySQL database and retrieves all destinations from the database. Displays retrieved destinations. Handle connection errors and database operation errors using exception handling.
Function to delete a destination: Allows the user to delete a destination from the travel planner dictionary based on the destination name. Displays current destinations before deletion and handles cases where the destination is not found.
Function to update destination information: Allows the user to update destination details in the travel planner dictionary. Displays current destinations before updating. Handles cases where the destination is not found and provides options to update specific details.
Create main program loop for menubased interaction that displays a menu to the user with different options. Based on user input, executes the corresponding functionality by calling the respective functions. I want the whole program with output
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
