import tkinter

class Globals:
    window = None
    label = None
    choiceVar = None

def radioButtonChosen():
    if Globals.choiceVar.get() == 1:
        selectedButtonText = "add"
    elif Globals.choiceVar.get() == 2:
        selectedButtonText = "subtract"
    elif Globals.choiceVar.get() == 3:
        selectedButtonText = "multiply"   
    Globals.label.configure(text= "radio button choice is: {}".format(selectedButtonText))
    

def setUpGUI():
    Globals.window = tkinter.Tk()
    Globals.choiceVar = tkinter.IntVar()
    
    choice1 = tkinter.Radiobutton(Globals.window, text="+", variable=Globals.choiceVar, value=1,
                  command=radioButtonChosen)
    choice1.pack()

    choice2 = tkinter.Radiobutton(Globals.window, text="-", variable=Globals.choiceVar, value=2,
                  command=radioButtonChosen)
    choice2.pack()

    choice3 = tkinter.Radiobutton(Globals.window, text="*", variable=Globals.choiceVar, value=3,
                  command=radioButtonChosen)
    choice3.pack()

    Globals.choiceVar.set(1)
    Globals.label = tkinter.Label(Globals.window,
                                  text = "radio button choice is: {}".format("add"))
    Globals.label.pack()
    
def startGUI():
    setUpGUI()
    Globals.window.mainloop()
