Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- def multi():
- a =float(r1.get())
- c =float(r2.get())
- d = a*c
- print(d)
- t4["text"] = d
- janela = Tk()
- janela.geometry("300x300+200+200")
- a =0
- c =0
- t1 = Label(janela ,text = 'Os valores para conta de multiplicação são ?')
- t1.place(x=1,y=1)
- r1 = Entry(janela)
- r1.place(x=1,y=30)
- t2 = Label(janela, text = 'x')
- t2.place(x=124,y=30)
- r2 = Entry(janela)
- r2.place(x=135,y=30)
- bt2 = Button(janela, width=20,text = "Calcular!",command = multi)
- bt2.place(x=1,y=90)
- t3 = Label(janela, text = "O resultado é : ")
- t3.place(x=1,y=55)
- t4 = Label(janela, text = "?")
- t4.place(x=80,y=55)
- janela.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement