主頁 - 美化按鈕 歡迎來到我們的網站! 會員登入 我的購物車 搜尋商品
發表文章
林韋誠HTML,CSS,Java Script將執行結果放置網頁取代檔案
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式
截圖 期中考重點 write寫入檔案模式mode w=write會覆蓋原有檔案, a=append接續原來檔案, x=create創立新檔案, x與w有何不同? write寫入檔案,預設不換行,換行'\n' print呈現在螢幕,預設換行,不換行end=''。 write寫入用到英文以外的字元(一,a,b)encoding='utf8' vs code的html的檔案 林韋誠輸入參數 輸入k 輸入m 輸入n 執行自訂函數 重點 alert內建函數,自訂函數abc 林韋誠輸出結果 vs code的css的檔案 h1{background-color: purple; color: white; border: 10px solid red; text-align:center; padding: 5px} ul{background-color: green; color: white; font-size: 2em;line-height:1.5} input{background-color:green;font-size: 5em; } vs code的js的檔案 function abc(){ k = document.getElementById(k).value; m = document.getElementById(m).value; n = document.getElementById(n).value; out=str(k); document.getElementById(out).innerHTML=out; }
林韋誠開啟資料夾編寫檔案
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式
程式碼 space, slash, backslash, cr = ' ', '/', '\\', '\n' k = input('輸入規格: ') m = input('輸入橫向規格: ') k,m=int(k),int(m) f = open("林韋誠.txt",'w',encoding="utf8") for i in range(1, k+1): for ii in range(m): for j in range(k-i): f.write(space) f.write(slash) for j in range(2*i-2): f.write(space) f.write(backslash) for j in range(k-i): f.write(space) f.write(cr) for i in range(1, k+1): for ii in range(m): for j in range(i-1): f.write(space) f.write(backslash) for j in range(2*k-2*i): f.write(space) f.write(slash) for j in range(i-1): f.write(space) f.write(cr) f.close() 381 382
林韋誠python內建built-in函數function迴圈loop範圍range
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式
W3shools內建函數列表 https://www.w3schools.com/python/python_ref_functions.asp Python has a set of built-in functions. Function Description abs() Returns the absolute value of a number all() Returns True if all items in an iterable object are true any() Returns True if any item in an iterable object is true ascii() Returns a readable version of an object. Replaces none-ascii characters with escape character bin() Returns the binary version of a number bool() Returns the boolean value of the specified object bytearray() Returns an array of bytes bytes() Returns a bytes object callable() Returns True if the specified object is callable, otherwise False chr() Returns a character from the specified Unicode code. classmethod() Converts a method into a class method compile() Returns the specified source as an object, ready to be executed complex() Returns a complex number delattr() Deletes the specified attribute (property or method) from the specified object dict() Returns a dictionary (Ar...
林韋誠python字串string內建built-in方法methods
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式
VS Code開發環境w3schools截圖 字串程式碼 a="ha,林韋誠很handsome,很變態!很詭異!我使用w3schools學習,也會用vsCode開發環境" b=a.replace('變態','瀟灑') print (a) print (b) print ('幾個很?',a.count('很')) print('很在0,1..位置', a.find('很')) print('很在0,1..位置', a.rfind('很')) print('a的長度',len(a)) print('英文大寫',a.upper()) print('英文小寫',a.lower()) txt = "HELLO,將第一個字母轉成大寫。" x = txt.capitalize() print (x) print (txt.casefold()) y=txt.center(30) print (txt.center(30)) print (y) print (len(y))
林韋誠Java程式設計
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式
import java.awt.*; import java.awt.geom.Line2D; import javax.swing.*; public class Options { public static void main(String[] args) { JFrame frame = new JFrame("林韋誠Java繪製選擇權到期日損益"); Container cp = frame.getContentPane(); cp.add(new JComponent() { public void paintComponent(Graphics g) { Graphics2D g2 = (Graphics2D) g; g2.setStroke(new BasicStroke(2));//stroke中風,筆觸 g2.setColor(Color.PINK); g2.setFont(new Font("monospaced",Font.BOLD,30)); g2.drawString("買入賣權到期日損益",0,120); g2.draw(new Line2D.Float(0, 0, 100, 100)); g2.draw(new Line2D.Float(100, 100, 200, 100)); g2.drawString("買入買權到期日損益",300,120); g2.draw(new Line2D.Float(300, 100, 400, 100)); g2.draw(new Line2D.Float(400, 100, 500, 0)); g2.drawString("賣出賣權到期日損益",0,180); ...
林韋誠金融市場常識測驗158到170數學表達
- 取得連結
- X
- 以電子郵件傳送
- 其他應用程式
金融市場常識題庫158至163 金融市場常識題庫164至170 除權息參考價 除權前一天60除權無償配股利的開盤參考價 除權息前一天價值=除權息當天價值 60=3+x⇒x=57 除權前一天60除權2元股票股利的開盤參考價 除權息前一天價值=除權息當天價值 60=(1+ 2 10 )x=1.2x⇒x= 60 1+0.2 =50 除權前一天60除權2元股票股利+3元現金股利的開盤參考價 除權息前一天價值=除權息當天價值 60=3+(1+ 2 10 )x=1.2x⇒x= 60-3 1+0.2 =47.5 練習mroot開平方msqrt 7 2 大約1(1+0.1) 開平方 100.0 =10 信用戶維持率 fraction分數 融資戶維持率= 融資購買股票現在的價值 融資的金額 division軍團區塊 融券維持率= 放空股票的金額+保證金 放空股票的現在價值 整戶維持率=上面分子加分子 / 分母加分母 劉任昌358影片 債券對利率的敏感性:存續期間Duration 存續期間愈小, 率風險愈低! 到期日愈小, 支付利息愈多, 愈頻繁, 愈早, 利率風險愈低 用數學表示存續期間, 債券價格P, 殖利率y 存續期間=- 1+Y P × DP DY