Welcome to the Treehouse Community
Looking to learn something new?
IF, IN Statement
I don't know how to set store_open to TRUE per the requested challenge. Below is the challenge.
See that time variable? That's what time it currently is, at least for this test. But, when you submit your code, the time might change! I need you to make an if condition that sets store_open to True if time is in the store_hours list. Otherwise, if time isn't in store_hours, set store_open to False. You'll probably have to use if, else, and in to solve this.
time = 15 store_open = None store_hours = [9, 10, 11, 12, 13, 14, 15, 16, 17, 18] if time in store_hours: then store_open = True else: if time not in stores_hours: then store_open = False
Steven Parker216,083 Points
You don't need a 2nd "if" because when you get to the "else" you already know that the time is not in the store_hours list.