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

Create a class named Store. Give it two attributes, open and close. Both should be set to an hour (e.g. open = 9)

check

2 Answers

Hi Wimbayi

Is your question about how to create a class with attributes, if so you might want to check out the python object oriented course on treehouse. as an example this is how you would do it.

class Store:
    open = 9 
    close = 5

i am getting error. store is not defined

i am getting error. store is not defined

can you post your code. make sure the class name is Store and store.

why the open color is like reserved keyword :/ in SQL when we use reserve keyword need to pass with [ ]

Hi Alfred

Yes open is a reserved keyword in python, to be more specific there is a python IO function called open() . Normally I would not declare a variable name the same as a reserved key word, it was done so in the context of this challenge.