(Store is closed) whats wrong with this code | Sololearn: Learn to code for FREE!


(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")

9/5/2021 5:48:48 AM

Devavrat Patil

3 Answers

New Answer


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


Myo Thuzar Excellent answer!


Rik Wittkopp thanks bro🙏