24th Aug 2020, 6:55 PM
Harun Yavuz
Harun Yavuz - avatar
8 Antworten
+ 6
put quotes for who are you like (if you're comparing for string) "who are you" Harun Yavuz yours break statement is also not in a very promising place.
24th Aug 2020, 6:56 PM
minirkk
minirkk - avatar
+ 3
Also asking for user input after break statement doesn't helps and so variable is never declared since break exists the while loop and whatever put after that isn't read
24th Aug 2020, 7:02 PM
Abhay
Abhay - avatar
+ 2
print("Hello. My name is Teressa. I am your assistant. How may I help you?") user_input = input() if (user_input == "who are you"): print("My name is Teressa.") Try this 🙂 https://code.sololearn.com/clNB166T9293/?ref=app
26th Aug 2020, 9:58 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 2
Harun Yavuz You never declared the user_input variable. In line 2 replace '==' with '='. These have different meanings. '==' is for comparison and '=' is for variable declaration. Hope u understood. Happy coding!
26th Aug 2020, 1:48 PM
MSN
MSN - avatar
+ 1
Harun Yavuz Can you tell us what do you wanna achieved/make?
24th Aug 2020, 7:03 PM
minirkk
minirkk - avatar
0
Now i understand thx <3
24th Aug 2020, 7:03 PM
Harun Yavuz
Harun Yavuz - avatar
0
You put == after user_input when you should only put 1 = to define a variable. User_input = "who are you" is correct NOT user_input == "who are you "
26th Aug 2020, 3:34 AM
Jason Kennedy