from tkinter import *
def a():
b=gebo.get()
if b==6:
label1.config(text="回答正确")
else:
label1.config(text="回答错误")
top=Tk()
top.geometry("300x400")
top.title("单选题")
label1=Label(top,text="琵琶行中”曹曹谢谢错杂谈“的上一句为何",bg="green")
label1.pack()
gebo=IntVar()
radiobutton1=Radiobutton(top,text="大弦嘈嘈如急雨",variable=gebo,value=1,command=a)
radiobutton1.pack()
radiobutton2=Radiobutton(top,text="大珠小珠落玉盘",variable=gebo,value=2,command=a)
radiobutton2.pack()
radiobutton3=Radiobutton(top,text="小闲谢谢如私语",variable=gebo,value=3,command=a)
radiobutton3.pack()
radiobutton4=Radiobutton(top,text="间关莺语花底滑",variable=gebo,value=4,command=a)
radiobutton4.pack()
top.mainloop()