给定Python Tkinter加减乘除单选框代码,运行后得到的界面是哪一项?
import tkinter
from tkinter import *
root = Tk()
v = IntVar()
calcs = [ ('+', 1),
('-', 2),
('*', 3),
('/', 4),
]
for calc, num in calcs:
# 设置单选框,用来显示运算符
Radiobutton(text = calc,variable =v,value=num).grid(row=num-1, column=1)
root.mainloop()
运行后的界面是?
正在加载题目数据…
子题
该题型需在试卷/作业中作答,单题练习暂不支持
答案解析