發表文章

目前顯示的是 5月, 2023的文章

陳禹熹EXCEL樞紐分析PivotTable交叉篩選Slicer

圖片
EXCEL另存範圍為html 陳禹熹2023/5/1統計於德明科大A106教室 台灣上市公司簽證會計師 簽證公司數目 勤業眾信聯合會計師事務所      339 資誠聯合會計師事務所          227 安侯建業聯合會計師事務所      219 安永聯合會計師事務所          106 國富浩華聯合會計師事務所      28 正風聯合會計師事務所          14 立本台灣聯合會計師事務所      12 信永中和聯合會計師事務所      6 大中國際聯合會計師事務所      5 德昌聯合會計師事務所          5 致遠聯合會計師事務所          4 惠眾聯合會計師事務所          3 群智聯合會計師事務所          3 建智聯合會計師事務所          3 霈昇聯合會計師事務所   ...

陳禹熹Python類別class函數function

圖片
from tkinter import * #從函式庫 tkinter 輸入所有 * 方法 from math import * #從函式庫 math 輸入所有 * 方法 from time import * #取代import time class Regular: def __init__(self, cx, cy, cr, s, t, c, w): #類別共同的設定必然 def __init__ initiate發起 self.cx, self.cy, self.cr = cx, cy, cr #取得中心座標cx, cy, 半徑cr self.s, self.t = s, t #取得邊角數目s,t尖銳程度,取代原來的k = s.get() self.c, self.w = c, w #取得顏色c,寬度w self.u = 2 * pi / self.s #使用模組 math 圓周率 pi self.x, self.y = [], [] for i in range( int(self.s * 1.5)): self.x.append(self.cx + self.cr*cos(i*self.u)) self.y.append(self.cy + self.cr*sin(i*self.u)) def draw(self): #類別的方法 for i in range( int(self.s * 1.5) - self.t): canvas.create_line(self.x[i], self.y[i], self.x[i + self.t], self.y[i + self.t], fill = self.c, width = self.w) sleep(0.5) #睡覺一秒,如果import time必須time.sleep(0.5) tk.update() #將視窗tb...

陳禹熹微軟ACCESS查詢SQL語法ASC上升DESC下降

圖片
取得連結

陳禹熹python, input, str, float

圖片
from math import * def f(r): print(f"陳禹熹輸入的半徑{r} ") print(f"圓面積: {pi*r*r} ") print(f"球體積: {pi*r*r*r*4/3}") print(f"球表面積:{pi*r*r*4}") def abc(r): print("陳禹熹輸入的半徑 " + str(r)) print("圓面積: "+str(pi*r*r)) print("圓周長: "+str(pi*r*2)) print("球體積: "+str(pi*r*r*r*4/3)) print("球表面積:"+str(pi*r*r*4)) def tri(z): print("陳禹熹輸入的角度 " + str(y)) print("正弦sin "+str(sin(z))) print("餘弦cos "+str(cos(z))) def g(z): print(f"正弦sin {sin(z)}") print(f"餘弦cos {cos(z)}") def group(r, t): abc(r) tri(t) f(r) g(t) r = float(input("輸入半徑: ")) y = float(input("輸入角度360度單位: ")) t = y/180*pi #將360較度轉成弧度180=pi group(r,t)

陳禹熹ACCESS建立資料庫關聯圖

圖片

陳禹熹Python類別class函數function

圖片
VS code編輯類別 VS code程式碼 from tkinter import * #從函式庫 tkinter 輸入所有 * 方法 from math import * #從函式庫 math 輸入所有 * 方法 class Regular: def __init__(self, cx, cy, cr, s, t, c, w): #類別共同的設定 self.cx, self.cy, self.cr = cx, cy, cr #取得中心座標cx, cy, 半徑cr self.s, self.t = s, t #取得邊角數目s,t尖銳程度,取代原來的k = s.get() self.c, self.w = c, w #取得顏色c,寬度w self.u = 2 * pi / self.s #使用模組 math 圓周率 pi self.x, self.y = [], [] for i in range( int(self.s * 1.5)): self.x.append(self.cx + self.cr*cos(i*self.u)) self.y.append(self.cy + self.cr*sin(i*self.u)) def draw(self): #類別的方法 for i in range( int(self.s * 1.5) - self.t): canvas.create_line(self.x[i], self.y[i], self.x[i + self.t], self.y[i + self.t], fill = self.c, width = self.w) def show(): #畫圖自訂函數 poly = Regular(cx.get(), cy.get(), cr.get(), s.get(), t.get(), c.get(), w.get()) polyList.app...

陳禹熹VSCode編輯Python, tkinter建構Button,Lable

圖片
微軟VS Code截圖 程式碼 from tkinter import * #從函式庫 tkinter 輸入所有 * 方法 # math只用三個沒必要輸入所有*, math.pi比 pi 更清楚 import math #連線去找函式庫 t = (3,4,5,6,7,8,9,10,11,12,16,20)#宣告一元組tuple(...) tk = Tk() tk.title("[陳禹熹視窗使用者介面GUI") canvas = Canvas(tk, width=800, height=500) canvas.pack() def show(event): #定義由事件event(按鈕選單)呼叫的函數show cx = 110 #宣告圓中心座標cx, cy半徑cr cy = 210 cr = 100 x, y =[],[] #宣告二陣列[...] k = s.get() #取得 ge t按鈕選單的選擇變數 u = 1 * math.pi / k #使用模組 math 圓周率 pi for i in range(k): x.append(cx + cr*math.cos(i*u)) #加入陣列的元素 y.append(cy + cr*math.sin(i*u)) #使用模組 math 三角函數cos, sin for i in range(k-1): canvas.create_line(x[i], y[i], x[i+1], y[i+1], fill="blue",width=5) canvas.create_line(x[k-1], y[k-1], x[0], y[0], fill="blue",width=5) #可考慮增加width寬度,fill顏色 def diagonal(): cx, cy, cr = 510, 210, 100 ...