+ 1

A problem with OR operator and input

So, i'm making a very simple program that ask the user to insert Week days just for writing some information about them (like weather, temperature ecc..) Oh, sorry if i speak a bad english but i'm italian :p My program: Day = input('Choose a day: ') if Day == ' Monday ' or ' monday: Print() else: So even if i write 'Bacon' the program Print the informations about Monday! Can the problem be With the OR operator or it's something else because idk What to do i just wanna make a simple program :p

22nd Jan 2017, 6:52 PM
Simon71
Simon71 - avatar
1 Odpowiedź
+ 5
if Day == ' Monday ' or Day == ' monday ':
22nd Jan 2017, 6:53 PM
Valen.H. ~
Valen.H. ~ - avatar