+ 2
(Store is closed) whats wrong with this code
If hour >=10 and hour <=21: If day >=1 and day<=5 : Print("open") Else: Print("closed")
3 Respostas
+ 4
Let me correct your code
hour=int(input())
day=int(input ())
if hour >=10 and hour <=21:
if day >=1 and day<=5 :
print("Open")
else:
print("Closed")
else:
print("Closed")
Here is explanation
1. you have to write "if" not "If" and write "else" not "Else" , write "print" not "Print"
2. you need to print output according to the problem's expectations
Like "Open" not "open"
Like "Closed" not "closed"
3. Indentation is important in python
else:
print("Closed") ❎
else:
print ("Closed")✔️
Plz be careful with capital letters and small letters
+ 1
Myo Thuzar
Excellent answer!
+ 1
Rik Wittkopp thanks bro🙏