Python Python Basics (2015) Logic in Python Membership

Mamadou Diene
Mamadou Diene
Python Web Development Techdegree Student 415 Points

See that time variable? That's what time it currently is, at least for this test. But, when you

i don't see why this code isn't working?

membership.py
time = 15

store_open = None
store_hours = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
if time in store_hours:
    store_open = True
    else:
    store_open = False

1 Answer

Steve Hunter
MOD
Steve Hunter
Treehouse Moderator 57,532 Points

HI there,

Try indenting your else back to be the same as the if level.

Steve.