最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(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期的評論 (共 條)

分享到微博請遵守國家法律
淮南市| 甘泉县| 阳新县| 上栗县| 安远县| 福安市| 鹤岗市| 佛学| 清苑县| 吐鲁番市| 东乡族自治县| 青田县| 漠河县| 海淀区| 珠海市| 江山市| 西青区| 洪雅县| 宁明县| 阆中市| 杭州市| 金塔县| 禹州市| 肃宁县| 凭祥市| 盐源县| 宝清县| 禄丰县| 锡林浩特市| 万载县| 社会| 英吉沙县| 台南市| 屏南县| 贞丰县| 汪清县| 古浪县| 霍州市| 登封市| 澄江县| 东光县|