I'm creating a program that helps solve quadratic equations - this is only an outcast to the layout, but essentially when I input the parameters (A, B and C) it should store it and then I can use it later.
this is what I got so far (Don't mind the names and text, it's in danish):
Vara = StringVar()
Varb = StringVar()
Varc = StringVar()
#Parabel
def Parabel():
parabel = Tk()
parabel.minsize(600, 400)
parabel.maxsize(600,400)
parabel.title("Parablens rødder")
pLabel = Label(parabel, text = "Parablens rødder").pack(side = TOP)
pLabel1 = Label(parabel, text = "Indtast parameterne A, B, C:").pack()
#A
pLabel2 = Label(parabel, text = "A:").pack()
pEntry1 = Entry(parabel, textvariable = Vara).pack()
#B
pLabel3 = Label(parabel, text = "B:").pack()
pEntry2 = Entry(parabel, textvariable = Varb).pack()
#C
pLabel4 = Label(parabel, text = "C:").pack()
pEntry3 = Entry(parabel, textvariable = Varc).pack()
pButton = Button(parabel, text = "OK", command = para ).pack()
def para():
a = Vara.get()
b = Varb.get()
c = Varc.get()
print(a,b,c) # just to test if they got stored,
From what I've read about this should work, but when I print a,b,c it comes up blank.