D
D
DimaD0106d2021-06-19 15:17:57
Python
DimaD0106d, 2021-06-19 15:17:57

Why doesn't the program work?

print('СЛОВА: Привет, пока, пошли')
look = input()
if look == Привет:
    print('Hello my friend')
elif look == пока:
    print ('bye my friend')
elif look == пошли:
    print('let`s play together')


Why does it give an error?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0ralo, 2021-06-19
@DimaD0106d

Need to bracket the words

Hey
,
Till
,
Went

x == y - compare variables
x == 'y' - compare variable and string

L
link_vrb, 2021-06-19
@link_vrb

Try this:
print('WORDS: Hello, bye, let's go')
look = input()
if look == 'Hi':
print('Hello my friend')
elif look == 'bye':
print ('bye my friend ')
elif look == 'let's go':
print('let`s play together')
if I put quotes

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question