A24928. 有如下程序:import tkinter as tk window = tk.Tk() window.geometry('300x150') window.title('my first window') var = tk.StringVar() label = tk.Label(window, textvariable=var) label.pack() on_hit = False def …
单选题
困难
知识点
题目描述
有如下程序:
import tkinter as tk
window = tk.Tk()
window.geometry('300x150')
window.title('my first window')
var = tk.StringVar()
label = tk.Label(window, textvariable=var)
label.pack()
on_hit = False
def hit_me():
global on_hit
if on_hit == False:
var.set('You hit me')
on_hit = True
else:
var.set('')
on_hit = False
button = tk.Button(window, text='hit me', width=15, height=1, command=hit_me)
button.pack()
window.mainloop()下列说法不正确的是?( )
选项(单选)
答案解析
详细答案解析为会员权益,按每日次数查看。
开通 / 升级会员
上一题
下一题