Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- from tkinter import messagebox
- root = Tk()
- text1 = Text(root, height=3, width=28)
- text1.place(x=0,y=0)
- #add buttons
- Button1 = Button(root, text="7", height=2, width=5)
- Button1.place(x=0,y=50)
- Button2 = Button(root, text="4", height=2, width=5)
- Button2.place(x=0,y=90)
- Button3 = Button(root, text="1", height=2, width=5)
- Button3.place(x=0,y=130)
- Button4 = Button(root, text="8", height=2, width=5)
- Button4.place(x=45,y=50)
- Button5 = Button(root, text="5", height=2, width=5)
- Button5.place(x=45,y=90)
- Button6 = Button(root, text="2", height=2, width=5)
- Button6.place(x=45,y=130)
- Button7 = Button(root, text="9", height=2, width=5)
- Button7.place(x=90,y=50)
- Button8 = Button(root, text="6", height=2, width=5)
- Button8.place(x=90,y=90)
- Button9 = Button(root, text="3", height=2, width=5)
- Button9.place(x=90,y=130)
- Button10 = Button(root, text="*", height=2, width=5)
- Button10.place(x=135,y=50)
- Button11 = Button(root, text="-", height=2, width=5)
- Button11.place(x=135,y=90)
- Button12 = Button(root, text="+", height=2, width=5)
- Button12.place(x=135,y=130)
- Button13 = Button(root, text="/", height=3, width=5)
- Button13.place(x=180,y=50)
- Button14 = Button(root, text="=", height=4, width=5)
- Button14.place(x=180,y=100)
- root.geometry("227x175")
- root.mainloop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement