發表文章

計瀚軒 HTML_CSS_Javascript_Java_Python

圖片
pmt = [0,0,0,0] #計瀚軒程式設計586設定串列list pmt[0]=float(input('計瀚軒躉繳金額: '))#float轉換成實數 float for nper in range(1,4): pmt[nper] = float(input('第'+str(nper)+'期回收: ')) def npv(rate): y = - pmt[0] for j in range(1,4): y = y + pmt[j]/(1+rate)**j return y a, b, gap, f = 0.0, 1.0, 9.0, 9.0 maxerror = 0.00000001 loopNumber = 1 while (gap > maxerror and abs(f) > maxerror and loopNumber maxerror and gap > maxerror): if ( f>0 ): a = c else: b = c gap = b-a; print('計瀚軒報酬率: ', c) print('計瀚軒淨現值: ', f) print('計瀚軒迴圈次數: ', loopNumber)

Javascript的輸出字體.font與fillStyle與fillText

Javascript在網頁就可以執行不需要開啟Spyder sin執行 cos執行 橫軸

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

embed嵌入(bed床,放入床上,嵌入鑽戒) 影片重點 Let's develop brains. 作文,在捷運讓座let給老弱婦孺。 yield (投降, 收益) Yield seats to elderly YTM=Yield to Maturity=到期收益率 nominal yield=coupon rate=票面利率 利用python編輯edit建立create word 檔案 Process 處理....procedure程序 SOP python命令,給文件新增加一個段落 document.add_paragraph('文字內容',格式) 網頁javascript命令 document.create_element('P'); 維基百科python了解 Python was conceived [構想, concept觀念, cognitive psychology認知心理學]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); ...

計瀚軒javascript網頁BUTTON按鈕ONCLICK

物件導向設計OOP=Object-Oriented Programming 主詞subject受詞object東方的oriental id=identity,身分證id card, division區塊,段落 計瀚軒 函數名稱()將要執行的程式碼用curly braces圍住。 PYTHON換列就是;區隔指令。PYTHON同一個縮排,就是{}的同一區塊。

計瀚軒Javascript物件導向方法是物件的函數

物件導向設計OOP=Object-Oriented Programming 主詞subject受詞object東方的oriental id=identity,身分證id card, division區塊,段落 .方法get()是取得對應的值,功能同字典 dict.get(s1.code)從dict字典取得索引為s1.code的值

計瀚軒整合開發環境IDE的Jupyter編輯Python程式碼

圖片
PYTHON程式碼放入SPYDER執行 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 ...

計瀚軒整合開發環境IDE的Jupyter編輯Python程式碼

圖片
Tkinter是Tk GUI工具包的Python繫結包。它是Tk GUI工具包的標準Python介面[3],並且是Python的業界標準GUI工具包。[4]Tkinter同時也包含在Python的Linux、Microsoft Windows和Mac OS X標準庫中。Tkinter的名字來自Tk interface 原始程式碼 python程式碼的空格也是指令,格相同個空格同一區塊{其他語言括號當區塊} 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('三菱銀行') banks.append('台灣銀行') ABC()#結束XYZ之前給它顯示{curly braces,bracket} def kill(): b1.pack_forget() tk = Tk() tk.title("計瀚軒python建立tkinter視窗使用者介面") #也可以定義視窗名為 window, root課本都如此習慣 canvas = Canvas(tk, width=400, height=400) canvas.pack() btn1 = Button(tk, text="賴青德銀行", command = ABC, b...

計瀚軒Javascript與Python比較

圖片
全球市場價值最大的銀行 按鈕PUSH增加 按鈕POP執行自訂函數kill 按鈕POP執行kill呼叫其他函數 CSS也可以in-line 寫在這裡成為網頁的一部分,執行後,可以看到。function kill_SHOW執行二指令 banks.pop()指令移除banks串列的最後一個元素ABC()去執行函數ABC()。P代表paragraph段落 以上程式碼 <STYLE>   BUTTON{COLOR:WHITE;BORDER-RADIUS:20PX;BACKGROUND-COLOR:BLACK;}   H1{COLOR:WHITE;BACKGROUND-COLOR:BLACK;TEXT-ALIGN:CENTER;PADDING:5PX;}   P{BACKGROUND-COLOR:GRAY; FONT-SIZE:24PX;COLOR:WHITE;} </STYLE> <button onclick="ABC()">全球市場價值最大的銀行</button> <button onclick="X()">按鈕PUSH增加</button> <button onclick="kill()">按鈕POP執行自訂函數kill</button> <button onclick="kill_SHOW()">按鈕POP執行kill呼叫其他函數</button> <P id="SHOW"></P> CSS也可以in-line <script> banks=['摩根大通','美國銀行','中國工商銀行','富國銀行','匯豐銀行','巴黎銀行']; function ABC()  {//第一個函數function ABC() let x = '';//定義字串x內容空白 for (let i in banks)//javascript for loop () python不需要     {...

計瀚軒python串列List(陣列Array),元組Tuple,集合Set,字典Dict

FONT字型,EM=EMPHASIZE強調 藉由複習HTML,JAVASCRIPT等,可以順便讓你們了解PYTHON的特色 .SELECTOR{用在多個元素},SPAN拇指與小指的距離,一小段,一小段的文字 UL=UNDERER LIST, OL=ORDERED LIST, LI=LIST push推,美國餐廳放置餐盤的架子下面是彈簧,取盤子pop,放入盤子push append附加在後面, appendix書本的附錄 大括號{ }CURLY BRACKET, CURLY捲,用於PYTHON集合 中括號[ ]SQUARE BRACKET, SQUARE方形,用於PYTHON串列 小括號( )CIRCLE BRACKET, CIRCLE圓,用於PYTHON元組 角括號<>ANGLE BRACKET,不能直接打角括號,因為它們是HTML命令,需用&符號接LT(小於Less Then)再分號; 圓周CIRCUMFERENCE, 直徑DIAMETER, 半徑RADIUS BORDER邊界, SOLID實心, PX=PIXEL點 PYTHON與JAVASCRIPT命令的對照,PYTHON必須透過編輯器或雲端伺服器(例如GOOGLE COLAB)執行,JAVASCRIPT可以直接在瀏覽器CHROME或EDGE執行 PYTHON指令len(串列)對比JAVASCRIPT串列.length; PYTHON指令串列.append(新增)對比JAVASCRIPT串列.push(新增); 按鈕BUTTON按下去的事件ONCLICK 按鈕BUTTON push 按鈕BUTTON按下去的事件ONCLICK 按鈕BUTTON push

計瀚軒PYTHON陣列ARRAY串列LIST字典DIC集合SET元組TUPLE

圖片
animal = ["豬", "牛", "羊", '貓', "蛇"] #python語言的註解comments,以下命令出現 print(animal[2]) print(animal[-5]) for i in range(5):#其他語言{}代表一個區 x = '我愛' + animal[i] print(x) #使用index print('上面使用index, 下面沒用') for i in animal: print(i) x = animal.copy() print(animal) x.reverse() #將x反轉reverse print(x) animal.append('狗') print(animal) y = animal.copy() y.reverse() #將x反轉reverse print(y) https://steam.oxxostudio.tw/category/python/info/online-editor.html Google Colab ( Colaboratory ) 是一個在雲端運行的編輯環境,由 Google 提供一個雲端虛擬主機,支援 Python 程式及機器學習 TensorFlow 演算法,Colab 目的在提供教育訓練以及教學研究,不用下載或安裝,就可直接編輯 Python,並使用 Python 的資源庫,大幅降低初學者的入門門檻,不用耗費太多時間在環境的安裝與設定。 在 Colab 裡編輯的程式碼,預設直接儲存在開發者的 Google Drive 雲端硬碟中,執行時由虛擬主機提供強大的運算能力,並不會用到本機的資源。但要如果程式閒置一段時間,會被停止並回收運算資源。

產一甲第二次計算機 D11336111

圖片
Canvas 計算機 Canvas 計算機 >

計瀚軒期末考Math.PI與Math.E放入計算機

計瀚軒學習Bro code製作計算機 + 7 8 9 - 4 5 6 * 1 2 3 / 0 . = 刪 π e ** https://www.youtube.com/watch?v=I5kj-YsmWjM Build this JS calculator in 15 minutes!

下午計瀚軒學習Bro code製作計算機

計瀚軒學習Bro code製作計算機 + 7 8 9 - 4 5 6 * 1 2 3 / 0 . = C https://www.youtube.com/watch?v=I5kj-YsmWjM Build this JS calculator in 15 minutes!

計瀚軒js產生html編碼建立超連結hyperlink

1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 , 23 , 24 , 25 , 26 , 27 , 28 , 29 , 30 , 31 , 32 , 33 , 34 , 35 , 36 , 37 , 38 , 39 , 40 , 41 , 42 , 43 , 44 , 45 , 46 , 47 , 48 , 49 , 50 , 51 , 52 , 53 , 54 , 55 , 56 , 57 , 58 , 59 , 60 , 61 , 62 , 63 , 64 , 65 , 66 , 67 , 68 , 69 , 70 , 71 , 72 , 73 , 74 , 75 , 76 , 77 , 78 , 79 , 80 , 81 , 82 , 83 , 84 , 85 , 86 , 87 , 88 , 89 , 90 , 91 , 92 , 93 , 94 , 95 , 96 , 97 , 98 , 99 , 100 , 101 , 102 , 103 , 104 , 105 , 106 , 107 , 108 , 109 , 110 , 111 , 112 , 113 , 114 , 115 , 116 , 117 , 118 , 119 , 120 , 121 , 122 , 123 , 124 , 125 , 126 , 127 , 128 , 129 , 130 , 131 , 132 , 133 , 134 , 135 , 136 , 137 , 138 , 139 , 140 , 141 , 142 , 143 , 144 , 145 , 146 , 147 , 148 , 149 , 150 , 151 , 152 , 153 , 154 , 155 , 156 , 157 , 158 , 159 , 160 , 161 , 162 , 163 , 164 , 165 , 166 , 167 , 168 , 169 , 170 , 171 , 172 , 173 , 174 , 175 , 176 , 177 , 178 , 179 , 180 , 181 , 182 , 183 , 184 , 185...