American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

5 PM – Python OOP – Allison

June 27 @ 5:00 pm - 7:00 pm

What We Did Today

  1. Reviewed lists, dictionaries, and classes
  2. 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:

  1. Redo/fix this part of last week’s homework: Try It Yourself section on pg.167. I will be reviewing this next class.
    1. Ann: Redo the homework on your own, without any online help.
    2. Clayton:  Finish the homework and fix any bugs.
    3. Yanbao: Finish the homework and fix any bugs
  2. Everyone:
    1. Create a list called fruit_list and make it store 5 fruit names.
    2. 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.
    3. Create a dictionary called favorite_fruit. Keys will be people’s names, values will be a fruit object. Make 5 key-value pairs.
      1. Ex: Key: Allison. Value: Blueberry (which is a fruit object, not a string)
    4. Other
      1. Add any missing parts of your class notes from our class notes (see link at bottom)
      2. Review the homework answers (see link at bottom)

Notes

  1. You can reach out via allison@ayclogic.com if you have any questions.
  2. Class notes and previous homework answers can be found here: Link to Google Drive

Details

Date:
June 27
Time:
5:00 pm - 7:00 pm
Event Categories:
,