Python Forum

Full Version: Tkinter adding entry values
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I know this may be a stupid post but I don't know what I'm missing. I'm trying to add two entry box values and put the result in another entry box. But instead of actually adding the values, it just adds the values side by side into the new entry box. What am I missing. Below is part of the code for this and I have attached a pic of the output screen. The entry box 'Rate' and the entry box 'tax' should add together and put the result in the 'daily amount' entry box.

# Insert daily amount
                j = ratee.get()
                f = taxe.get()
                dailyamount=j + f
                dailye.insert(0, dailyamount)
Entry's return string values, you must convert the strings into numbers to add them together, try using float to convert the values.