"The code below for making bot is not recognized except ""Hello"", and it does not respond well."
The input character is utf8 and python is version 3.6.
Indentation is causing the response to be displayed
The reason is that you are in the
If you follow the code a little bit, when you type 'Hello'
It matches the conditions of the
if statement, but
break skips the response part because it leaves the loop, and the
response does not appear.
Also, if you enter 'thank you', you will not be able to break the loop compared to 'hello' at first, so you are running the answer part.
© 2023 OneMinuteCode. All rights reserved.