18SOECE11008 Assignment 2
18SOECE11008 Assignment 2
root = Tk()
root.title("Chatbot")
def send():
txt.insert(END, "n"+send)
user = e.get().lower()
if(user == "hello"):
else:
e.delete(0, END)
txt = Text(root)
e = Entry(root, width=100)
e.grid(row=1, column=0)
root.mainloop()
[
r"what (.*) want ?",
["Make me an offer I can't refuse",]
],
[
r"(.*) created ?",
["Raghav created me using Python's NLTK library ","top secret ;)",]
],
[
r"(.*) (location|city) ?",
['Indore, Madhya Pradesh',]
],
[
r"how is weather in (.*)?",
["Weather in %1 is awesome like always","Too hot man here in %1","Too cold man here in
%1","Never even heard about %1"]
],
[
r"i work in (.*)?",
["%1 is an Amazing company, I have heard about it. But they are in huge loss these days.",]
],
[
r"(.*)raining in (.*)",
["No rain since last week here in %2","Damn its raining too much here in %2"]
],
[
r"how (.*) health(.*)",
["I'm a computer program, so I'm always healthy ",]
],
[
r"(.*) (sports|game) ?",
#include<stdio.h>
#include<conio.h>
int main()
int i, j, product;
clrscr();
for(i=1;i<=10;i++)
for(j=1;j<=10;j++)
product = i*j;
printf("\n");
getch();
return(0);
function createEvent() {
var event = {
description: 'To discuss our plans for the presentation next week.',
start: {
dateTime: start.toISOString()
},
end: {
dateTime: end.toISOString()
},
attendees: [
{email: '[email protected]'},
{email: '[email protected]'}
],
colorId: 11
};
/**
* Helper function to get a new Date object relative to the current date.
* @param {number} daysOffset The number of days in the future for the new date.
* @param {number} hour The hour of the day for the new date, in the time zone
* of the script.
*/
date.setDate(date.getDate() + daysOffset);
date.setHours(hour);
date.setMinutes(0);
date.setSeconds(0);
date.setMilliseconds(0);
return date;