Hi, i need to create a simple interactive bot in python that response as yes or no for whatever is the user input.Please help.

Recommended Answers

All 2 Replies

I suggest

# python 2
class Bot(object):
    def mainloop(self):
        while True:
            raw_input("? ")
            print("yes")
if __name__ == "__main__":
  bot = Bot()
  bot.mainloop()

as a starting point.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.