jeudi 24 novembre 2016

yes or no output in python

I am new to python I am trying to code this, I am asking a question, hence the "Are you a mutant" and depending on if the user responds with a yes or no it should come up the respective output but it works only for yes but not for no. how do i make it work for the elif output?

print("Are you a mutant?")
answer = input()
if    'Yes':
    print("Your application to Xavier's School for Gifted Youngsters has been accepted")
elif 'No':
    print("Your application was not successful on this occassion")

`

Aucun commentaire:

Enregistrer un commentaire