0
Help me!!! Excersice 21.3 of python
My code: hour = int(input()) day = int(input()) if hour > 10 and hour < 21: if print ("Open") elif day == 2: print ("Closed") elif day == 6: print ("Closed") else: print("Closed")
2 Answers
+ 2
hour = int(input())
day = int(input())
if hour > 10 and hour < 21:
if #<--đČ???
print ("Open")
elif day == 2:
print ("Closed")
elif day == 6:
print ("Closed")
else:
print("Closed")
+ 1
Instead of checking each day one by one, try to do the same what you did for hour variable.
You can join that two conditions using another `and` operator.