Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Dates and Times in Python (2014) Let's Build a Timed Quiz App The Question Classes & the Plan

Yongyut Ruangsirinusorn
Yongyut Ruangsirinusorn
Courses Plus Student 4,008 Points

Why both class attributes and instance attributes are in the classes?

I saw Kenneth had both 'questions = []', class attributes, and 'self.questions', instance attributes, in Quiz class. But I don't understand why. Also in questions.py, he used 'answer = None' and 'text = None' but in Add and Multiply class he used self.answer and self.text instead. Are class attributes in this scenario necessary? Thank you.