-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVidyut?.py
77 lines (55 loc) · 1.7 KB
/
Vidyut?.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import string
import metaplot
name = "VIDYUT ?"
import time
nowT = time.ctime()
ver = 1.0
verAge = 0
qna = {
"hi":"hey",
"how are you": "I am fine",
"what is your name" : name ,
"how old are you" : verAge ,
"what is your version": ver ,
"what is the time now ?": nowT,
}
while True:
qs = input()
if(qs == "quit"):
break
else:
print(qna[qs])
f = font.Font(weight='bold', size = 16)
f2= font.Font(weight='bold',size = 35)
lb2 = Label(root, text =" graph maker",font=f,fg='black').grid(row = 0, column = 0,pady = 7)
lbl = Label(root, text =" AI developed by Vyoam ",font=f,fg='red').grid(row = 1, column = 0,pady = 7)
inputbox = Entry(root, width=59, fg='red')
inputbox.grid(row = 2, column = 0,pady = 7,padx=5)
def click():
string = inputbox.get()
string = string.lower()
x = np.arange(0,4*np.pi,0.1)
if "graph" in string:
if "sin graph" in string:
y = np.sin(x)
if "cos graph" in string:
y = np.cos(x)
if "tan graph" in string:
y = np.tan(x)
if "cosec graph" in string:
y = 1/np.sin(x)
if "sec graph" in string:
y = 1/np.cos(x)
if "cot graph" in string:
y = 1/np.tan(x)
plt.plot(x,y)
plt.show()
btn = Button(root, text= "PRESS",borderwidth=1, padx=2, pady=2 , bg ='grey', fg='white',font=f,command = click).grid(row = 2, column = 1,pady = 7, padx= 7)
def time():
string = strftime('%H:%M:%S %p')
lbl.config(text = string)
lbl.after(1000, time)
lbl = Label(root, font = ('Times new roman',40,'bold') , background = 'purple' , foreground ='white')
lbl.grid(column = 3, row=3)
time()
mainloop()