これはただ凍り続けます。while ループが実行されず、それが問題だと思います
from Tkinter import*
def reveal():
counter=0
lowest=0
Stotal=0
i=0
cost=float(cost_ent.get())
if cost>0:
lowest=cost
counter+=1
Stotal=cost+Stotal
else:
message="Invalid Number"
txt.insert(0.0, message)
while i==0:
cost=float(cost_ent.get())
if cost>0:
counter+=1
Stotal=cost+Stotal
if cost<lowest:
lowest=cost
else:
message="Invalid Number"
txt.insert(0.0, message)
message="The number of items:",counter,"\n"
txt.insert (0.0, message)
message="The subtotal is:",Stotal,"\n"
txt.insert(0.0, message)
message="The lowest item is:",lowest,"\n"
txt.insert(0.0, message)
message="The discount is:", discount,"\n"
txt.insert(0.0, message)
message="Before tax:", Stotal-discount,"\n"
txt.insert(0.0, message)
tax=Stotal*tax
message="The tax is:",tax,"\n"
txt.insert(0.0, message)
message="The total is:",Stotal+tax,"\n"
txt.insert(0.0, message)
txt.delete(0.0, END)
root=Tk()
root.title("BOXING DAY SALE !!!!!!")
root.geometry("600x400")
app=Frame(root)
app.grid()
instl_lbl=Label(app,text = "Enter item cost")
instl_lbl.grid(row=1, column=1, sticky=W)
cost_ent=Entry(app)
cost_ent.grid(row=1, column=2, sticky=W)
bttn=Button(app, text="Enter", command=reveal)
bttn.grid(row=2, column=2, sticky=W)
txt=Text (app, width=50, height=10, wrap=WORD)
txt.grid(row=4, column=2, sticky=W)
root.mainloop()