Exercise: Practice Writing a Class

Let’s finish the day with an exercise. Look around you and pick a real-world item. You’ll model this item using a Python class.

Write a class and pick a few of this item’s characterestics and add them as data attributes.

Pick a few actions this item can do and add them as methods.

Share your code on the forum.


Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Already a member? Sign-In

Locked learning resources

The full lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Already a member? Sign-In

You must own this product to join the conversation.