Balança (usando tkinter)
from tkinter import * root = Tk() root.title( "Balança" ) root.geometry( "400x250" ) root.configure( bg = "#a5c0fa" ) root.resizable( 0 , 0 ) def cal (): peso = variavel1.get() precoporunidade = variavel2.get() t = peso*precoporunidade tarr = round (t , 2 ) variavel3.set(tarr) #PESO texto1 = Label( text = "Peso (kg) " , font =( "Arial" , "12" , "bold" ) , fg = "#034bd9" , bg = "#a5c0fa" ) texto1.place( relx = 0.15 , rely = 0.1 ) variavel1 = DoubleVar() entrada1 =Entry( textvariable =variavel1 , justify = 'center' ) entrada1.place( relx = 0.1 , rely = 0.25 ) # PREÇO POR UNIDADE texto2 = Label( text = "Preço por kg " , font =( "Arial" , "12" , "bold" ) , fg = "#034bd9" , bg = "#a5c0fa" ) texto2.place( relx = 0.65 , rely = 0.1 ) variavel2 = DoubleVar() entrada2 =Entry( textvariable =v...