This question already has an answer here:
day = input("Enter a Day:")
is_vacation = input("Is this a vacation?")
if((day == 'Monday', 'Tuesday', 'Wednesday', 'Thrusday', 'Friday') and is_vacation == 'No'):
print('False')
elif((day == 'Saturday', 'Sunday') and is_vacation == 'Yes'):
print('True')
My input is: day = Monday is_vacation = Yes Output: True I have used and the operator in first if block it should be false.
Aucun commentaire:
Enregistrer un commentaire