摘要: import tkinter as tkfrom tkinter import ttkdef getSum(): bb1.configure(text = int(a.get())+int(b.get()))def getJian(): bb2.configure(text = int(a.get( 阅读全文
posted @ 2020-12-22 19:27 发牌员鲍勃 阅读(724) 评论(0) 推荐(0)
摘要: import tkinter as tkfrom tkinter import ttkdef inputData(): b.configure(text = v.get()) title.configure(foreground = "green")win = tk.Tk()v = tk.Strin 阅读全文
posted @ 2020-12-22 18:36 发牌员鲍勃 阅读(476) 评论(0) 推荐(0)
摘要: import tkinter as tkfrom tkinter import ttkdef getEntry1(): sum = 0 n = int(s.get()) for i in range(1,n+1): sum += i print(sum)win = tk.Tk()s = tk.Str 阅读全文
posted @ 2020-12-18 16:39 发牌员鲍勃 阅读(606) 评论(0) 推荐(0)
摘要: def getEntry1(): print(s.get())win = tk.Tk()s = tk.StringVar()e = ttk.Entry(win,width = 10,textvariable = s)e.grid(column = 0 ,row = 0)b = ttk.Button( 阅读全文
posted @ 2020-12-18 16:24 发牌员鲍勃 阅读(687) 评论(0) 推荐(0)
摘要: def firstchange(): b1.configure(text = "Hello World")def secondchange(): b2.configure(background = "red") import tkinter as tkfrom tkinter import ttk 阅读全文
posted @ 2020-12-18 13:51 发牌员鲍勃 阅读(660) 评论(0) 推荐(0)
摘要: import tkinter as tk win = tk.Tk() win.title("Python GUI") #窗口的标题 win.mainloop() **增加按钮,显示标签 import tkinter as tk from tkinter import ttk def click_me 阅读全文
posted @ 2020-12-18 13:30 发牌员鲍勃 阅读(1886) 评论(0) 推荐(0)
摘要: '''age = 56count = 0while count<3: _age = int(input("输入年龄:")) if _age == age: print("恭喜你答对了") break elif _age > age: print("猜大了") else: print("猜小了") c 阅读全文
posted @ 2020-12-17 22:01 发牌员鲍勃 阅读(163) 评论(0) 推荐(0)
摘要: name = input("name:" )age = input("age:" )info = '''__________info of %s_________name: %sage: %s''' % (name,name,age)print(info) name = input("name:" 阅读全文
posted @ 2020-12-17 21:59 发牌员鲍勃 阅读(73) 评论(0) 推荐(0)