hi , below is my program which is supposed to accept 3 different numbers , add them up and print the result but what it does is that it takes the first number and mutiplies that by 3 , where have I gone wrong ?
from Tkinter import *
def update(event):
amount = 0
for x in range(3):
amnt=float(e.get())
amount=amount + amnt
lab.config(text='total='+ str(amount))
# e.delete(0,END) ,I thought this would solve the problem but it did not
root = Tk()
label1=Label(root,text="please enter amount")
label1.grid(row=0,sticky=W)
e=Entry(root,takefocus=1)
e.grid(row=0,column=1)
e.focus_set()
e.bind('<Return>',update)
lab=Label(root,text='')
lab.grid(row=5,columnspan=2)
root.mainloop()