Help me!!! Excersice 21.3 of python | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
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")

20th Jan 2022, 2:07 AM
Jefferson Jesus Beleño Suarez
Jefferson Jesus Beleño Suarez - avatar
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")
20th Jan 2022, 3:06 AM
Solo
Solo - avatar
+ 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.
20th Jan 2022, 6:37 AM
Simba
Simba - avatar