Python Python Basics (2015) Logic in Python Membership

SERKAN YESILAY
SERKAN YESILAY
345 Points

Can't solve it, Help

What is wrong? 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

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,546 Points

Hi there,

Unindent the last two lines by 4 spaces each. The else should be level with the if:

if time in store_hours:
    store_open = True
else:
    store_open = False

Steve.