import tkinter as tk
def add_counter(): #增加计数
print("add....")
def zero_counter(): #归零计数
print("zero....")
#窗口的属性(大小,)
root = tk.Tk()
root.geometry("400x200+200+200")
root.title("简单窗口程序")
#增加按钮
button = tk.Button(root, text="增加", command=add_counter)
button.pack()
#归零按钮
button = tk.Button(root, text="归零", command=zero_counter)
button.pack()
#退出按钮
root.mainloop()