-2

How can I set it up so that if the customer answers something so my script could answer back according to the customers answer like :

pres = input ('Please enter the surname of a recent President of the United States: ')
if pres == 'Bush' or 'Obama' or 'Clinton':
    print('Great job! You know your stuff!')
else:
    print('Sorry, that was incorrect.')

But i want to be that if, you answer "Bush" it will give you and answer and if you answer "clinton" another answer. In the script if you press "bush" or "clinton" the answer is the same : print('Great job! You know your stuff!')

Sorry for my bad explanation, and this is my first topic in here.

glibdud
  • 7,550
  • 4
  • 27
  • 37
Bakki
  • 3
  • 1
  • Please read https://www.programiz.com/python-programming/if-elif-else – Andra Oct 21 '19 at 13:53
  • Personally I think [this one](https://stackoverflow.com/questions/20002503/why-does-a-b-or-c-or-d-always-evaluate-to-true) makes a better dupe target (certainly better title), but it seems this is in fact not what OP's questoin is about. – tobias_k Oct 21 '19 at 14:02

1 Answers1

0
if pres == 'Bush':
    # do something
elif pres == 'Obama':
    # do something else
else:
    print('Sorry, that was incorrect.')

Simon Crane
  • 2,122
  • 2
  • 10
  • 21