文章

顯示從 4月, 2025 起發佈的文章

Word File Processing in Python(Python處理Word檔案)

維基百科python了解 Python was conceived in the late 1980s[42] by Guido van Rossum at Centrum Wiskunde & Informatica (CWI) in the Netherlands; it was conceived as a successor to the ABC programming language, which was inspired by SETL,[43] capable of exception handling and interfacing with the Amoeba operating system.[12] Python implementation began in December 1989.[44] Van Rossum assumed sole responsibility for the project, as the lead developer, until 12 July 2018, when he announced his "permanent vacation" from responsibilities as Python's "benevolent dictator for life" (BDFL); this title was bestowed on him by the Python community to reflect his long-term commitment as the project's chief decision-maker.[45] (He has since come out of retirement and is self-titled "BDFL-emeritus".) In January 2019, active Python core developers elected a five-member Steering Council to lead the project.[46][47] The name Python is said to derive from the British c...

張園芯Javascript 網頁 BUTTON按鈕 物件的函數期中考

物件導向設計OOP=Object-Oriented Programming 主詞subject受詞object東方的oriental id=identity,身分證id card, division區塊,段落 張園芯執行 期中考心得將以前的重點貼上 不編排PYTHON程式碼,期中考後再練習。 JAVASCRIPT的字典 dict =new Map([["2303","聯電"],["2330","台積電"],["2880","華南金"],['AAPL','蘋果公司'],['C','花旗銀行'],['T','美國電話電報']]);//宣告配對(字典) PYTHON的字典 dict ={"2303":"聯電","2330":"台積電","2880":"華南金",'AAPL':'蘋果公司','C':'花旗銀行','T','美國電話電報'}

張園芯Javascript物件導向方法是物件的函數

物件導向設計OOP=Object-Oriented Programming 主詞subject受詞object東方的oriental 2330 股數 100 2880 股數 1000 台積電 股數 100 華南金 股數 1000 id=identity,身分證id card, division區塊,段落 .方法get()是取得對應的值,功能同字典 dict.get(s1.code)從dict字典取得索引為s1.code的值 張園芯以上的程式碼 物件導向設計OOP=Object-Oriented Programming 主詞subject受詞object東方的oriental id=identity,身分證id card, division區塊,段落 .方法get()是取得對應的值,功能同字典 dict.get(s1.code)從dict字典取得索引為s1.code的值

張園芯Javascript與Python比較

張園芯增加 張園芯銀行 刪除串列的最後一個元素 心得與期中考重點 python命令command='執行的程式' Javascript ONCLICK='執行的程式()' 沒必要如此做程式就可以執行,方便在未來maintain後來的python空格與跳行都是命。跳行行就是取代;號,用相同的空格數(縮牌一起)就{} ONCLICK按下滑鼠的事件on click按下

張園芯python,tkinter,Entry建構輸入工具,pop移除串列元素

圖片
from tkinter import * #從函式庫 tkinter 輸入所有 * 方法 banks=['摩根大通','美國銀行','中國工商','富國銀行','匯豐銀行','巴黎銀行'] def ABC(): #畫圖 define自訂函數 global b1 #宣告b1是廣域GLOBAL變數,其他函數也可使用 txt = '' for i in range(len(banks)): txt += banks[i] + ' ' b1=Label(canvas,text=txt,font='Arial 20 bold') b1.pack(side=TOP) def XYZ(): #清除視窗的all所有canvas圖 banks.append(bank.get())#得到bank變數 ABC()#結束XYZ之前給它顯示 def kill(): banks.pop()#pop()移除banks串列的最後一個元素 ABC() tk = Tk()#建構視窗名為tk global bank#宣告廣域變數bank,local是global相反 bank = StringVar(tk)#bank視窗tk變數 tk.title("張園芯python建立tkinter視窗使用者介面") #也可以定義視窗名為 window, root課本都如此習慣 canvas = Canvas(tk, width=400, height=400) canvas.pack() btn1 = Button(tk, text="列出銀行", command = ABC, bg='black',fg='white').pack(side=LEFT) btn2 = Button(tk, text="增加", command = XYZ, fg='blue').pack(side=LEFT) btn3 = Button(tk, text...