What We Did Today
- Reviewed lists, dictionaries, and classes
- Finished the Grocery System with Class project
Homework
Create a file called June27_BugFixesandReview.py and submit into the google drive when you are finished:
- Redo/fix this part of last week’s homework: Try It Yourself section on pg.167. I will be reviewing this next class.
- Ann: Redo the homework on your own, without any online help.
- Clayton: Finish the homework and fix any bugs.
- Yanbao: Finish the homework and fix any bugs
- Everyone:
- Create a list called fruit_list and make it store 5 fruit names.
- Create a class called Fruit. The class will hold attributes such as name and color. The class will have a method eat_fruit that prints: “{fruit_name} has been eaten!”. Create 2 fruit objects: strawberry and orange. Call the eat_fruit method on both objects.
- Create a dictionary called favorite_fruit. Keys will be people’s names, values will be a fruit object. Make 5 key-value pairs.
- Ex: Key: Allison. Value: Blueberry (which is a fruit object, not a string)
- Other
- Add any missing parts of your class notes from our class notes (see link at bottom)
- Review the homework answers (see link at bottom)
Notes
- You can reach out via allison@ayclogic.com if you have any questions.
- Class notes and previous homework answers can be found here: Link to Google Drive