發表文章

陳彥勳_Javascript與Python計算內部報酬率IRR

圖片
IRR 計算器 + 現金流圖表 報酬率: 淨現值: 迴圈次數: Python生成之結果

陳彥勳_Javascript執行三角函數繪圖

互動式三角函數圖表 選擇函數: sin(x) cos(x) tan(x) csc(x) sec(x) cot(x) 函數公式:

陳彥勳_Javascript計算內部報酬率IRR

IRR 計算器 + 現金流圖表 報酬率: 淨現值: 迴圈次數:

陳彥勳_Javascript數值方法numerical現值PresentValue

現值計算器 + PVIFA 計算 💡 現值計算器 + PVIFA 計算 利率 % (rate) 期數 (nper) 每期金流 (pmt) 終值 (fv) 📝 計算紀錄 利率 期數 金流 終值 現值結果 📚 參考資料:劉任昌金融市場講義 點此查看

陳彥勳_建構網頁文件

圖片
Python程式碼 !pip install gradio !pip install python-docx import gradio as gr from docx import Document # 定義生成Word文件的函數 def create_word(text): document = Document() document.add_heading('OXO的python套件docs', 0) p = document.add_paragraph('文件document是網頁HTML根物件,也是') p.add_run('微軟WORD').bold = True p.add_run('文書軟體的根物件,HTML和WORD的結構') p.add_run('幾乎全然相同。').italic = True document.add_heading('標題一OXO真偉大', level=1) p = document.add_paragraph('為什麼偉大?說明如下。') document.add_heading('超級帥', level=2) p = document.add_paragraph('沒有人比他更帥。') document.add_heading('超級幽默', level=2) p = document.add_paragraph('沒有人比他更幽默。') document.add_paragraph(text) file_path = 'demo.docx' document.save(file_path) return file_path # 創建Gradio界面 iface = gr.Interface(fn=create_word, inputs="text", outputs="file") # 運行應用 iface.launch(share=True...

陳彥勳_HTML按鈕BUTTON事件ONCLICK

Stock Management 物件導向設計OOP=Object-Oriented Programming id=identity, 身分證id card, division區塊, 段落 陳彥勳執行 Python程式碼 python -m ensurepip --upgrade pip install Flask from flask import Flask, render_template_string app = Flask(__name__) html_code = """ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Stock Management</title> <style> body { font-family: Arial, sans-serif; margin: 20px; 1 { color: #333; } .stock-info { margin-bottom: 20px; } button { padding: 10px 20px; background-color: #4CAF50;...

陳彥勳_Javascript物件導向Python物件導向

股票代碼: 公司名稱: 股數: 價格:

陳彥勳_Javascript與Python比較

銀行列表管理 陳彥勳_JAVASCRIPT不需要如PYTHON輸入TKINTER因已經在視窗執行 增加銀行 顯示銀行 刪除最後一個銀行

陳彥勳_Python/Tkinter/Entry建構輸入工具/Pop移除串列元素

圖片
整合開發環境IDE 程式碼 !pip install gradio import gradio as gr class BankManager: def __init__(self): self.initial_banks = [ '臺灣土地銀行', '合作金庫商業銀行', '第一商業銀行', '華南商業銀行', '彰化商業銀行', '台北富邦商業銀行', '國泰世華商業銀行', '兆豐國際商業銀行', '花旗(台灣)商業銀行', '王道商銀', '臺灣中小企業銀行', '渣打國際商業銀行', '滙豐(台灣)商業銀行', '臺灣新光商業銀行', '聯邦商業銀行', '遠東商業銀行', '元大商業銀行', '永豐商業銀行', '玉山商業銀行', '凱基商業銀行', '星展(臺灣)商業銀行', '台新國際商業銀行', '中國信託商業銀行', '將來商業銀行', '連線商業銀行', '樂天國際商業銀行' ] self.banks = self.initial_banks.copy() def format_banks(self): formatted_list = [] for i in range(0, len(self.banks), 3): line = self.banks[i:i+3] while len(line)

陳彥勳_整合開發環境IDE的Colab編輯Python程式碼

圖片
整合開發環境IDE 程式碼 !pip install gradio import gradio as gr initial_banks = [ '臺灣土地銀行', '合作金庫商業銀行', '第一商業銀行', '華南商業銀行', '彰化商業銀行','台北富邦商業銀行', '國泰世華商業銀行', '兆豐國際商業銀行', '花旗(台灣)商業銀行','王道商銀', '臺灣中小企業銀行', '渣打國際商業銀行', '滙豐(台灣)商業銀行', '臺灣新光商業銀行','聯邦商業銀行', '遠東商業銀行', '元大商業銀行', '永豐商業銀行', '玉山商業銀行', '凱基商業銀行', '星展(臺灣)商業銀行', '台新國際商業銀行', '中國信託商業銀行', '將來商業銀行', '連線商業銀行','樂天國際商業銀行' ] banks = initial_banks.copy() def format_banks(bank_list): formatted_list = [] for i in range(0, len(bank_list), 3): line = bank_list[i:i+3] while len(line) WIKIPEDIA 解釋 IDE WIKIPEDIA 解釋 COLAB

陳彥勳_Javascript與Python比較

台灣市場價值最大的銀行 顯示銀行列表 增加銀行 移除銀行 移除並顯示銀行列表 CSS也可以in-line

陳彥勳_python串列List(陣列Array),元組Tuple,集合Set,字典Dict

圖片
Bracket Types and Definitions 嵌入影片522 期中考筆試重點 大括號 { } CURLY BRACKET, CURLY 捲, 用於 PYTHON 的集合 中括號 [ ] SQUARE BRACKET, SQUARE 方形, 用於 PYTHON 串列 小括號 ( ) CIRCLE BRACKET, CIRCLE 圓, 用於 PYTHON 元組 角括號 < > CORNER BRACKET 圓周 CIRCUMFERENCE, 直徑 DIAMETER, 半徑 RADIUS BORDER 邊界, SOLID 實心, PX=PIXEL 點 PYTHON 與JAVASCRIPT命令的對照 PYTHON 指令len(串列)對比JAVASCRIPT串列.length PYTHON 指令串列.append(新增)對比JAVASCRIPT串列.push(新增) 隨機生成 清除 臺灣銀行 臺灣土地銀行 合作金庫商業銀行 第一商業銀行 華南商業銀行 彰化商業銀行 上海商業儲蓄銀行 台北富邦商業銀行 國泰世華商業銀行 兆豐國際商業銀行 花旗(台灣)商業銀行 王道商銀 臺灣中小企業銀行 渣打國際商業銀行 滙豐(台灣)商業銀行 臺灣新光商業銀行 聯邦商業銀行 遠東商業銀行 元大商業銀行 永豐商業銀行 ...

陳彥勳_派神PYTHON陣列ARRAY串列LIST

圖片
import random import string random_data = random.sample(string.ascii_uppercase, len(string.ascii_uppercase)) animal_list = random_data[:4] print("列表:", animal_list) animal_tuple = tuple(random_data[4:8]) print("元組:", animal_tuple) animal_set = set(random_data[8:12]) print("集合:", animal_set) animal_dict = {random_data[i]: random_data[i+1] for i in range(12, 24, 2)} print("字典:", animal_dict) animal_list.append(random.choice(string.ascii_uppercase)) print("添加元素後的列表:", animal_list) animal_tuple = animal_tuple + (random.choice(string.ascii_uppercase),) print("添加元素後的元組:", animal_tuple) animal_set.add(random.choice(string.ascii_uppercase)) print("添加元素後的集合:", animal_set) animal_dict[random.choice(string.ascii_uppercase)] = random.choice(string.ascii_uppercase) print("添加元素後的字典:", animal_dict) slice_list = animal_list[1:3] print("列表切片 (1到3):", slice_list) another_set = set(random.sampl...

乙班_陳彥勳_利用Copilot大語言模型產生程式碼計算機

圖片
計算機與Python List Methods 1 2 3 4 C 5 6 7 8 + 9 0 . * - √ sin cos tan / ^ π log atan = Python List Methods Method Description append() Adds an element at the end of the list clear() Removes all the elements from the list copy() Returns a copy of the list count() Returns the number of elements with the specified value ...

下午_陳彥勳_期末考Math.PI與Math.E放入計算機

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

下午_陳彥勳_eval函數將字串運算

陳彥勳學習eval函數將字串運算 + 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! 心得與考試重點 disply的vlue用eval(display.value)取代,算是「字串」運算結果 eval()內建函數(方法) in-line線內設定樣式。 readonly唯讀read only。電腦的.的接續術性或函數disply.value面板顯示的內容value值。px=pixel點

下午_陳彥勳_學習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! 心得與考試重點 LIST條列, UL=UNORDERED LIST, OL=ORDERED LIST, BUTTON按鈕, CLICK按下, ONCLICK事件網頁的命令,大小寫都可以。 刪 刪 SCRIPT區段有三個自訂的函數 function appendToDisplay(input) { const display = document.getElementById("display"); display.value += input;} function clearDisplay() { const display = document.getElementById("display"); display.value = "";} function calculate() { const display = document.getElementById("display"); try{ display.value = eval(display.value); } catch(error){display.value = "Error";} } 在STYLE區段定義.MY{BACKGROUND-COLOR: PURPLE;}可以用在網頁的CLASS='MY'元件徘徊 CSS上製造滑鼠在上面就會改片樣式HOVER同義字excurse, hesitate, hover, linger, potter, roam BUTTON:HOVER滑鼠在上面,BUTTON:ACTIVE按下滑鼠 ...

下午_陳彥勳_BUTTON按下_滑鼠事件ONCLICK執行函數

陳彥勳 一般來說先放style, script,才放html. 地表最強帥哥,你叫我嗎?不分青紅皂白的執行!

陳彥勳_超連結到其他網頁id

if else判斷 001 , 002 , 003 , 004 , 005 , 006 , 007 , 008 , 009 , 010 , 011 , 012 , 013 , 014 , 015 , 016 , 017 , 018 , 019 , 020 , 021 , 022 , 023 , 024 , 025 , 026 , 027 , 028 , 029 , 030 , 031 , 032 , 033 , 034 , 035 , 036 , 037 , 038 , 039 , 040 , 041 , 042 , 043 , 044 , 045 , 046 , 047 , 048 , 049 , 050 , 051 , 052 , 053 , 054 , 055 , 056 , 057 , 058 , 059 , 060 , 061 , 062 , 063 , 064 , 065 , 066 , 067 , 068 , 069 , 070 , 071 , 072 , 073 , 074 , 075 , 076 , 077 , 078 , 079 , 080 , 081 , 082 , 083 , 084 , 085 , 086 , 087 , 088 , 089 , 090 , 091 , 092 , 093 , 094 , 095 , 096 , 097 , 098 , 099 , 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 , ...