Write a Python program to analyze data from a CSV file named olympic_medals.csv.
This file contains information about Olympic athletes, including their Name, Age, Country, and number of Gold, Silver, and Bronze medals.
-
Load the data:
- Read the CSV file, assuming well-formed data (no commas inside quoted fields).
-
Implement functions to:
- Calculate the total number of medals won by a specified country.
- Compute the average age of athletes from a given country.
- Identify the athlete with the most total medals from a country.
- Determine which country has won the most gold medals overall.
- List all distinct sports represented in the dataset.
- Find the top athlete (most total medals) in a specific sport.
- Identify the athlete with the most gold medals in a given sport.
-
Provide a user menu that allows:
- Selecting one of the above queries by entering a choice.
- Inputting the required country name when needed.
- Viewing the list of all sports available in the dataset.
- Exiting the program gracefully.
- Use appropriate data structures (lists, dictionaries) to store and process the data.
- Handle user inputs cleanly and validate where necessary.
- Write modular code with clear functions for each task.
- Add a feature to display the total number of athletes from a given country.
- Add a filter to list athletes above a certain age.
Submit a complete Python script that meets the above requirements and runs interactively via the console.