vendredi 30 octobre 2020

It keeps print sorry to hear that even if the input contains was fine or anything else . What can I do about it ? Please i would appreciate answers

Name=input("what's your name:")
print("Hello",Name, "I am Nexus . was designed by Ibrahim to keep you company")
Day=input("How was your day:")
if 'was not'in 'Day':
    print("sorry  to hear that")
elif 'was fine' in 'Day':
    print('ok')
else:
    print('sorry about that')

#I want the code to be able to print various responses to various questions . But it prints sorry to hear that even if Day contained was fine or a response not containing was not .

Aucun commentaire:

Enregistrer un commentaire