hi , I am trying to first ask the user how many numbers he has ( I have not coded this part yet but assumed number 5 ), then enter the first number , hit enter , enter another number in the same entery widget up until the numbers are finished then print the result . the error I am getting is it can not convert string to float , any idea how to solve this ? thanks
from tkinter import *
def update(event):
sum1=0.0
i=0
while i<=5:
e.delete(0,END)
value=float(e.get())
sum1=sum1 + value
i=i+1
lbl2.config(text=sum1)
root = Tk()
lbl=Label(root,text='enter the number')
lbl.grid(row=0 , column=0)
value=DoubleVar()
sum1=DoubleVar()
e=Entry(root )
e.grid(row=0,column=1)
e.bind('<Return>' , update)
lbl2=Label(root,text=' ')
lbl2.grid(row=1,column=0)
root.mainloop()