I want to make a calculator that adds 10 to the number using tkinter. But I had to get the entry price in int format, so I used get method. I keep getting the following error message. What's the problem?
from tkinter import *
window=Tk()
a=Entry(window)
a.pack()
b=a.get()
c=int(b)
result2=Label(window,text="")
result2.pack()
def Button_Press():
global c
result=c+10
result2.config(text=result)
button=Button(window,command=Button_Press())
button=pack()
window.mainloop()
Here's the error text.
c=int(b)
ValueError: invalid literal for int() with base 10: ''