from tkinter import *
def a():
b=gebo.get()
if b==2:
label1.config(text="回答正确")
else:
label1.config(text="回答错误")
c=Tk()
c.geometry("300x400")
c.title("单选题")
label1=Label(c,text="鸡小美喜欢看什么?",bg="green")
label1.pack()
gebo=IntVar()
radiobutton1=Radiobutton(c,text="超级飞侠",variable=gebo,value=1,command=a)
radiobutton1.pack()
radiobutton2=Radiobutton(c,text="汪汪队立大功",variable=gebo,value=2,command=a)
radiobutton2.pack()
radiobutton3=Radiobutton(c,text="熊出没",variable=gebo,value=3,command=a)
radiobutton3.pack()
radiobutton4=Radiobutton(c,text="大头儿子小头爸爸",variable=gebo,value=4,command=a)
radiobutton4.pack()
c.mainloop()