Skip to content

Commit 3a714aa

Browse files
committed
Update CalcGUIModified.py
same
1 parent 0594bed commit 3a714aa

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

3 calcGUI/CalcGUIModified.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from tkinter import *
22
from math import sqrt as sqr
3-
3+
from math import sin
44

55
class Application(Frame):
66
"""
@@ -144,6 +144,15 @@ def create_widgets(self):
144144
Creates the widgets to be used in the grid.
145145
:return: None
146146
"""
147+
self.sin_bttn = Button(self, text="sin", width=9, height=3, command=lambda: self.add_chr('sin'))
148+
self.sin_bttn.grid(row=1, column=6)
149+
150+
self.tan_bttn = Button(self, text="tan", width=9, height=3, command=lambda: self.add_chr('tan'))
151+
self.tan_bttn.grid(row=2, column=6)
152+
153+
self.cos_bttn = Button(self, text="cos", width=9, height=3, command=lambda: self.add_chr('cos'))
154+
self.cos_bttn.grid(row=3, column=6)
155+
147156
self.eq_bttn = Button(self, text="=", width=20, height=3, bg="Orange", command=lambda: self.calculate())
148157
self.eq_bttn.grid(row=4, column=4, columnspan=2)
149158

@@ -168,7 +177,7 @@ def create_widgets(self):
168177
self.mod_bttn = Button(self, text="%", width=9, height=3,bg='LightBlue', fg='red', command=lambda: self.add_chr('%'))
169178
self.mod_bttn.grid(row=4, column=2)
170179

171-
self.seven_bttn = Button(self, text="Bushra", width=9, height=3, bg='LightBlue', fg='red',command=lambda: self.add_chr("Siddiqi"))
180+
self.seven_bttn = Button(self, text="7", width=9, height=3, bg='LightBlue', fg='red',command=lambda: self.add_chr("7"))
172181
self.seven_bttn.grid(row=1, column=0)
173182

174183
self.eight_bttn = Button(self, text="8", width=9, height=3,bg='LightBlue', fg='red', command=lambda: self.add_chr(8))
@@ -186,7 +195,7 @@ def create_widgets(self):
186195
self.six_bttn = Button(self, text="6", width=9, height=3,bg='LightBlue', fg='red', command=lambda: self.add_chr(6))
187196
self.six_bttn.grid(row=2, column=2)
188197

189-
self.one_bttn = Button(self, text="1", width=9, height=3,bg='LightBlue', fg='red', command=lambda: self.add_chr(1))
198+
self.one_bttn = Button(self, text="Uchenna", width=9, height=3,bg='LightBlue', fg='red', command=lambda: self.add_chr("Mogbo"))
190199
self.one_bttn.grid(row=3, column=0)
191200

192201
self.two_bttn = Button(self, text="2", width=9, height=3, bg='LightBlue', fg='red',command=lambda: self.add_chr(2))

0 commit comments

Comments
 (0)