- 1

Can you see anything wrong with this code (Python)?

I was doing a practice in python and cant get past it because one of the tests was wrong but I don't know what the output was because it was one of the hidden test. So is there anything maybe wrong that would make the output opposite of what it suppose to be? Code: hour = int(input()) day = int(input()) # your code goes here if hour > 9 and hour < 22: if day < 5: print('Open') else: print('Closed')

29th Nov 2021, 3:14 AM
Evan Bain
Evan Bain - avatar
2 Answers
+ 2
if day <= 5
29th Nov 2021, 4:59 AM
Shadoff
Shadoff - avatar
0
Without the task description there is no way to tell. But maybe one or more of the comparisons should be "<=" or ">=".
29th Nov 2021, 3:50 AM
Simon Sauter
Simon Sauter - avatar