Boolean logic | Sololearn: Learn to code for FREE!

-1

Boolean logic

You need to create a program that outputs whether a store is Open or Closed, based on the hour and the day of the week. The store is open on all days from 10 to 21, except Saturday and Sunday. You need to take the hour and the day of the week as input. The day of the week is represented as an integer (1 for Monday, 2 for Tuesday, etc.) My code hour = int(input()) day = int(input()) # your code goes here if(hour<10 and hour>21): if(day==6 and day==7): print('Closed') else: print('Open')

12/3/2020 5:26:16 PM

Abhishek Sinha

3 Answers

New Answer

+6

#Try this hour = int(input()) day = int(input()) # your code goes here if(hour<10 or hour>21) or (day==6 or day==7): print('Closed') else: print('Open')

+2

If you want to receive help, you need to show us your attempt

0

hour = int(input()) day = int(input()) # your code goes here if(hour<10 and hour>21): if(day==6 and day==7): print('Closed') else: print('Open')