国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

雙色球第2023027期

2023-03-11 01:30 作者:麒麟不拆家Kirin  | 我要投稿

第2023027期分析計(jì)算結(jié)果如下:

紅:2、9、10、11、15、17、22、27、29

藍(lán):5、10、11、15看好5


以下是幾個Python GUI程序設(shè)計(jì)的實(shí)例:

1.簡單計(jì)算器

import tkinter as tk


class Calculator:

? ? def __init__(self, master):

? ? ? ? self.master = master

? ? ? ? master.title("Calculator")


? ? ? ? self.display = tk.Entry(master, width=20, justify='right', font=('Arial', 16))

? ? ? ? self.display.grid(row=0, column=0, columnspan=4, padx=5, pady=5)


? ? ? ? button_text = ['7', '8', '9', '/',

? ? ? ? ? ? ? ? ? ? ? ?'4', '5', '6', '*',

? ? ? ? ? ? ? ? ? ? ? ?'1', '2', '3', '-',

? ? ? ? ? ? ? ? ? ? ? ?'0', '.', 'C', '+']


? ? ? ? r = 1

? ? ? ? c = 0


? ? ? ? for b in button_text:

? ? ? ? ? ? if b == 'C':

? ? ? ? ? ? ? ? tk.Button(master, text=b, width=5, height=2, command=lambda: self.clear()).grid(row=r, column=c, padx=2, pady=2)

? ? ? ? ? ? elif b == '+':

? ? ? ? ? ? ? ? tk.Button(master, text=b, width=5, height=2, command=lambda: self.add()).grid(row=r, column=c, padx=2, pady=2)

? ? ? ? ? ? elif b == '-':

? ? ? ? ? ? ? ? tk.Button(master, text=b, width=5, height=2, command=lambda: self.subtract()).grid(row=r, column=c, padx=2, pady=2)

? ? ? ? ? ? elif b == '*':

? ? ? ? ? ? ? ? tk.Button(master, text=b, width=5, height=2, command=lambda: self.multiply()).grid(row=r, column=c, padx=2, pady=2)

? ? ? ? ? ? elif b == '/':

? ? ? ? ? ? ? ? tk.Button(master, text=b, width=5, height=2, command=lambda: self.divide()).grid(row=r, column=c, padx=2, pady=2)

? ? ? ? ? ? else:

? ? ? ? ? ? ? ? tk.Button(master, text=b, width=5, height=2, command=lambda x=b: self.add_to_display(x)).grid(row=r, column=c, padx=2, pady=2)


? ? ? ? ? ? c += 1


? ? ? ? ? ? if c > 3:

? ? ? ? ? ? ? ? c = 0

? ? ? ? ? ? ? ? r += 1


? ? def add_to_display(self, text):

? ? ? ? self.display.insert(tk.END, text)


? ? def clear(self):

? ? ? ? self.display.delete(0, tk.END)


? ? def add(self):

? ? ? ? self.display.insert(tk.END, '+')


? ? def subtract(self):

? ? ? ? self.display.insert(tk.END, '-')


? ? def multiply(self):

? ? ? ? self.display.insert(tk.END, '*')


? ? def divide(self):

? ? ? ? self.display.insert(tk.END, '/')



root = tk.Tk()

calculator = Calculator(root)

root.mainloop()

本期精算結(jié)果如下:

紅:2、11、17、22、27、29

藍(lán):5

本文僅供學(xué)習(xí),感謝觀看


雙色球第2023027期的評論 (共 條)

分享到微博請遵守國家法律
闽侯县| 资源县| 江津市| 明光市| 中阳县| 双江| 辽宁省| 沙洋县| 赣州市| 南开区| 张家口市| 开化县| 阿拉善右旗| 沐川县| 大余县| 柳江县| 瑞金市| 龙州县| 房产| 喀喇| 榆林市| 东兴市| 永康市| 阿拉尔市| 宜兰市| 仙游县| 习水县| 临西县| 哈尔滨市| 都江堰市| 平远县| 略阳县| 巴林右旗| 法库县| 抚宁县| 清水河县| 汤原县| 徐闻县| 托克逊县| 高安市| 潜江市|