(Store is closed) whats wrong with this code | Sololearn: Learn to code for FREE!
Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite
+ 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")

5th Sep 2021, 5:48 AM
Devavrat Patil
Devavrat Patil - avatar
3 Réponses
+ 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
5th Sep 2021, 6:14 AM
Myo Thuzar
Myo Thuzar - avatar
+ 1
Myo Thuzar Excellent answer!
5th Sep 2021, 9:28 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Rik Wittkopp thanks broūüôŹ
5th Sep 2021, 9:30 AM
Myo Thuzar
Myo Thuzar - avatar