```
from tkinter import *
from datetime import datetime
import pickle
import os

##database will be with these mulas = dict{"name":["value","rate","left"]}

def _price_inputs():

    filename = "datas.pk"

    rupen = Tk()
    rupen.title("Montessori Management System")
    rupen.geometry("1600x800")
    rupen.configure(bg="black")

    framex = Frame(rupen, width=1600, bg="RoyalBlue4", height=100, relief=GROOVE).pack(side=TOP)

    # ==++++===========================title=============================

    #this is the variable for incoming
    names = StringVar()
    rates = IntVar()
    totals = IntVar()

    llb1 = Label(framex, font=("arial", 20, "italic"), bg="black", fg="green", text="STOCK MANAGEMENT",
                 relief=GROOVE).pack(side=TOP)

    now = datetime.now()
    hour = str(now.hour)
    d = str("\\")
    minute = str(now.minute)
    second = str(now.second)
    year = str(now.year)
    month = str(now.month)
    day = str(now.day)

    time =  "\t\t"+year + d + month + d + day + "\n\t\t" + hour + ":" + minute + ":"+second+"\n\n"
    showing = str("#") * 100 + "\n"

    def add_on():

        name = names.get()
        rate = float(rates.get())
        total = float(totals.get())
        with open(filename, "rb") as f:
            dic = pickle.load(f)

        dic[name] = [rate,total]

        with open(filename, "wb") as f:
            pickle.dump(dic, f)

        names.set("")
        rates.set("")
        totals.set("")
        """with open(filename, "rb") as f:
            dic = pickle.load(f)
            lbl.insert(END, "\n")
            lbl.insert(END, dic)
        print(dic)"""
        #_price_inputs()
        #add_fun()
        rupen.destroy()
        _price_inputs()

    def _sold():
        nam = names.get()
        rat = rates.get()
        total = totals.get()
        total = float(total)

        with open(filename, "rb") as f:
            dic = pickle.load(f)

        sold = dic[nam][1]
        dic[nam][1] = sold - rat
        with open(filename, "wb") as f:
            pickle.dump(dic, f)

        names.set("")
        rates.set("")
        totals.set("")
        rupen.destroy()
        _price_inputs()

    def quit():
        # show = "asjdfaskldjflsajdlfj"
        lbl.delete(0.0, END)
        rupen.destroy()
        # lbl.insert(END,"asjdfaskldjflsajdlfj")

    '''
            rate = str(rate)
            total = str(total)
            with open(filename, "rb") as f:
                dic = pickle.load(f)
                if os.path.getsize(filename) >= 1:
                    dic[name] = [rate,total]
                    lbl.insert(END, dic)'''

    lbl = Text(rupen, wrap=WORD, font=("arial", 16, "bold"), height=100, fg="red", width=100)
    lbl.pack(side=RIGHT)

    # show = "asjdfaskldjflsajdlfj"
    with open(filename, "rb") as f:
        ano = pickle.load(f)
    lbl.insert(END, time)

    for k, v in ano.items():
            lbl.insert(END, "\n")
            lbl.insert(END, k)
            lbl.insert(END, "--> ")
            lbl.insert(END, "\t")
            lbl.insert(END, v[0])
            lbl.insert(END, "\t")
            lbl.insert(END, v[1])
            lbl.insert(END, "\n")
    '''for k, v in dic.items():
        show = """{} -->   rate:- {}    Total:- {}  
                """.format(k,v[0],v[1])
    lbl.insert(END, show)
'''

    ####################ENTRY############################
    ent1 = Entry(rupen,font=("arial",16,"bold"),textvariable=names,bd=5,bg="black",fg="white")
    ent1.pack(side=BOTTOM)
    ent2 = Entry(rupen,font=("airal",16,"bold"),bd=5,bg="black",textvariable=rates,fg="white")
    ent2.pack(side=BOTTOM)
    ent3 = Entry(rupen,font=("arial",16,"bold"),bd=5,bg="black",textvariable=totals,fg="white")
    ent3.pack(side=BOTTOM)

####################BUTTONS#########################
    btn0 = Button(rupen,font=("arial",16,"bold"),bd=5,bg="black",text="sold",fg="white",command=_sold)
    btn0.pack(side=BOTTOM)
    btn = Button(rupen, font=("arial", 16, "bold"), bd=5, bg="black", fg="white", text="quit", command=quit,
                 relief=RAISED)
    btn.pack(side=BOTTOM)
    btn2 = Button(rupen, font=("arial", 16, "bold"), bd=5, bg="black", fg="white", text="Add", relief=RAISED,
                  command=add_on)
    btn2.pack(side=BOTTOM)

    def rupen_():
        rupen.destroy()

    #with open("filename.pk", "wb") as f:
        #pickle.dump(f, data)
     #   pass
    rupen.mainloop()

if __name__ == "__main__":
    _price_inputs()

```

I have this tkinter code where i can add the items with the item name rate and Total. I am not getting the float answer while clicking add or sold button.

Suppose i want to add the item1 with 12.3 rate and Total 10.5 and after i click the add button it only adds 12.0 and 10.0 the value after the . is lost.