-
Notifications
You must be signed in to change notification settings - Fork 0
/
cal buttons.py
30 lines (27 loc) · 1.76 KB
/
cal buttons.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
from tkinter import *
root=Tk()
Button(root,text="=",width=17,height=4,bg="blue").grid(row=4, column=4,columnspan=2)
Button(root,text='AC',width=8,height=4,bg="yellow").grid(row=1, column=4)
Button(root,text='C',width=8,height=4,bg="yellow").grid(row=1, column=5)
Button(root,text="+",width=8,height=4,bg="yellow").grid(row=4, column=3)
Button(root,text="x",width=8,height=4,bg="yellow").grid(row=2, column=3)
Button(root,text="-",width=8,height=4,bg="yellow").grid(row=3, column=3)
Button(root,text="÷",width=8,height=4,bg="yellow").grid(row=1, column=3)
Button(root,text="%",width=8,height=4,bg="yellow").grid(row=4, column=2)
Button(root,text="7",width=8,height=4,bg="yellow").grid(row=1, column=0)
Button(root,text="8",width=8,height=4,bg="yellow").grid(row=1, column=1)
Button(root,text="9",width=8,height=4,bg="yellow").grid(row=1, column=2)
Button(root,text="4",width=8,height=4,bg="yellow").grid(row=2, column=0)
Button(root,text="5",width=8,height=4,bg="yellow").grid(row=2, column=1)
Button(root,text="6",width=8,height=4,bg="yellow").grid(row=2, column=2)
Button(root,text="1",width=8,height=4,bg="yellow").grid(row=3, column=0)
Button(root,text="2",width=8,height=4,bg="yellow").grid(row=3, column=1)
Button(root,text="3",width=8,height=4,bg="yellow").grid(row=3, column=2)
Button(root,text="0",width=8,height=4,bg="yellow").grid(row=4, column=0)
Button(root,text=".",width=8,height=4,bg="yellow").grid(row=4, column=1)
Button(root,text="(",width=8,height=4,bg="yellow").grid(row=2, column=4)
Button(root,text=")",width=8,height=4,bg="yellow").grid(row=2, column=5)
Button(root,text="√",width=8,height=4,bg="yellow").grid(row=3, column=4)
Button(root,text="x²",width=8,height=4,bg="yellow").grid(row=3,column=5)
root.title("Buttons")
root.mainloop()