Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- import random
- root = Tk()
- c = Canvas(root, width = 400, height = 20)
- c.create_text(200, 10, text= "Введите пример : ")
- c.pack()
- e = Entry(root, width = 20)
- e.pack()
- b = Button (root, width = 20, text = "Решить")
- b.pack()
- l = Label(root, width = 50, bg = "Black", fg = "White")
- l.pack()
- def main(event):
- p = e.get()
- p = str(p)
- h = eval(p)
- h = str(h)
- l["text"] = ''.join(h)
- b.bind ("<Button-1>", main)
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement