From 2c9a22ad4d149b78b8f530ffe6ed6abd03d30d43 Mon Sep 17 00:00:00 2001 From: mayank161001 <72152742+mayank161001@users.noreply.github.com> Date: Thu, 1 Oct 2020 00:33:41 +0530 Subject: [PATCH] Update chatbot.py --- chatbot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chatbot.py b/chatbot.py index f01c48a..83b412a 100644 --- a/chatbot.py +++ b/chatbot.py @@ -6,7 +6,7 @@ from string import punctuation from math import sqrt -# initialize the connection to the database +# initialize the connection to the database with interner connection:---- connection = sqlite3.connect('chatbot.sqlite') cursor = connection.cursor() @@ -48,10 +48,10 @@ def get_words(text): B = 'Hello!' while True: - # output bot's message + # output bot's messages print('B: ' + B) - # ask for user input; if blank line, exit the loop - H = raw_input('H: ').strip() + # ask for user input; if blank line, exit the loop it save your command + H = input('H: ').strip() if H == '': break # store the association between the bot's message words and the user's response