0

hiya i am completely new to all of this programming and forum stuff and I dont completely know what i am doing.i am just trying my first real project that's meant to be a small conversation.(focus on last part of coding) so far i have

print('Hello my name is NATBNAT- pronounced Nat.Ben.nat')

import time
time.sleep(2)

human1 = input ('Whats your name if i may ask?')


import time
time.sleep(2) # Import time allows for a delay in response. In this situation it has been used to allow for a more 'human' response.

#The {} let's the '.format' at the end know when to insert 'human1'
print('{} ....Hmm nice name'.format(human1))

import time
time.sleep(1)

feeling1 = input("So {} how are you feeling? Unhappy? ok? or Happy?".format(human1)) #once the human has answered ^^^^ question then whatever was the answere will be Feeling1. e.g.

if(feeling1 == 'unhappy' or 'Unhappy'):
    print('oh chucks, is there anything i can do to make it better?')
elif(feeling1 == 'ok' or 'Ok'):
    print('OOO intresting 0_o . I usually only know the differance between yes/no on/off or happy/unhappy. Please tell me if your ok because you could be better or you just feel worn out') 
elif(feeling1 == 'Happy' or 'happy'):
    print(' Oh Good ol man ... boy i mean girl... wait... DOH! I dont have eyes or the understanding between Female or Male names -_-')

it's all working fine in the sense that there are no errors but it is just saying the first 'if' statement even if i input 'ok' or 'happy'. please excuse the notes as they are just meant to be reminders for myself. Thank you :)

karthikr
  • 97,368
  • 26
  • 197
  • 188

1 Answers1

3

if(feeling1 == 'unhappy' or 'Unhappy') doesn't do what you are expecting. It should be like this:

if feeling1 == 'unhappy' or feeling1 == 'Unhappy':

Or you could do:

if feeling1 in ('unhappy','Unhappy',):
Jahid
  • 21,542
  • 10
  • 90
  • 108