AlienBot

Hi in the first couple parts of the Alien Bot projects all what happens is that the computer asks the user to either continue with the question or exit and it is not doing anything after it asks the first question.
this is my code:

Define .greet() below:

def greet(self):
self.name = input("What is your name “)
will_help = f"Hi {self.name}, I am Etcetera, I do not not live on this planet, will you tell me about your life?”
if will_help in self.negative_responses:
print(“Byeeeeeee!”)
return False
self.chat()

What would you expect it to do? Currently what the method is doing is:

  1. Taking the users name.
  2. Saving a sentence to a variable.
  3. Checking if that sentence is in a list.
  4. continuing based on that.

If you have a look at the ‘negative_responses’ list, you’ll see that it’s a predefined set of strings. Do you think that the current will_help variable will ever be in this list, and as such ever give a negative response?

1 Like