The keywords can be used for output from any input. It would allow for full natural sentences from speech to text. I used keywords such as "not" and "never." If the keyword is in the sentence, it can respond. The random generator combined with concatenation means the output will not be the same all the time. I called the variable "end" to be used at the end of sentences. Just put "+ end" at the end of any sentence and it will be impossible to predict the output. For a full fledged program it is easy to come up with lots of ending to choose from.
Another tricks to be more natural is to have verbal output after a certain amount of time if the user does not respond. This would be random also. Output could be text to speech.
The idea of this is to call other routines such as with the BJ trainer or motion detector. Such as "If user moves, print 'stop moving.'" It can also to be connected to talking animation.
Use this compiler to test, just copy and paste.
https://www.onlinegdb.com/online_python_compiler
# Sentence ending variations
import random
randending = random.randint(1, 4)
if randending == (1):
end = ', damn it!'
if randending == (2):
end = ', now!'
if randending == (3):
end = (', or else!')
if randending == (4):
end = (', or you will get it bad')
response = str(input("Tell me that you want it: "))
responselow=response.lower() # Make lower case to find keyword easier
# keyword find
matches = ["no", "not", "never", "won't"] # keywords
if any(x in responselow for x in matches):
print ("I said do it" + (end))
else:
print("Then do it")