from tkinter import *
def a():
b=timu.get()
if b==3:
label1.config(text="回答正确")
else:
label1.config(text="回答错误")
root=Tk()
root.geometry("300x400")
label1=Label(root,text="张平喜欢吃什么",bg="green")
label1.pack()
timu=IntVar()
asd1=Radiobutton(root,text="薯片",variable=timu,value=1,command=a)
asd1.pack()
asd2=Radiobutton(root,text="辣条",variable=timu,value=2,command=a)
asd2.pack()
asd3=Radiobutton(root,text="大鸡腿",variable=timu,value=3,command=a)
asd3.pack()
asd4=Radiobutton(root,text="佳佳",variable=timu,value=4,command=a)
asd4.pack()
root.mainloop()