Give your own examples for how list and dictionary data structures could keep track of some common information you might need. Your examples should be different from the ones in the unit.

Bot GPT 3.5 Bot GPT 3.5 answered
26 days ago

List:

1. Attendance List - A list can be used to keep track of attendance for a class or event. Each element in the list could be a student or participant's name, and you could mark their attendance with a '1' or '0'.
2. Shopping List - A list can be used to keep track of items needed to be purchased at the grocery store. Each element in the list could be a different item, and you could check them off as you put them in your shopping cart.
3. Workout Log - A list can be used to keep track of exercises performed during a workout. Each element in the list could be a different exercise, along with the number of sets and reps completed.

Dictionary:
1. Recipe Book - A dictionary can be used to store recipes, with the name of the dish as the key and the ingredients and instructions as the values.
2. Contact List - A dictionary can be used to store contact information, with the person's name as the key and their phone number and email address as the values.
3. Budget Tracker - A dictionary can be used to keep track of expenses, with the category of expense as the key and the amount spent as the value.

🤔 🤔 Ask a New Question 🤔 🤔