發表文章

林墐佩python內建built-in函數functions迴圈loop

圖片
截圖 程式碼 print(int(10)) print(int("ff",16)) print(int('100',16)) print(int('100',8)) a = [0>1, 2>1, 3==3]#串列list使用square bracket中括號 print("是否all全真",all(a)) print("存在任何any一個真",any(a)) print("林墐佩bin二進位輸出一到9") for i in range(10): #0 to 9進位1 print(bin(i)) for i in range(0, 200, 10): print(hex(i)) a = ('蘋果', '香蕉', '櫻桃',"durian") b = "Hello World" c = 33 d ={'蘋果', '香蕉', '櫻桃',"durian"} e=['蘋果', '香蕉', '櫻桃',"durian"] print("a元組typle", type(a)) print("b字串", type(b)) print("c整數integer", type(c)) print(type(d), type(e)) w3schools內建函數列表 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 readab...

林墐佩Python字串string方法methods

圖片
單元371影片 vs code與w3schools截圖 程式碼 txt = "林墐佩Love奇異果,奇異果我my favoritE水果奇異果" print(txt.count("奇異果")) print('先練習內建函數len',len(txt)) print('find',txt.find("奇異果")) print('rfind',txt.rfind("奇異果")) print("print列印,字串string字元character的組合") print(txt.title()) print(txt.lower()) print(txt.upper()) print(txt.swapcase()) print(txt.zfill(32)) print(txt.startswith("林")) print(len(txt)) for i in range(33333, 33344): print(chr(i)) for i in range(65, 70): print(chr(i)) w3schools字串方法列表 Method Description capitalize() Converts the first character to upper case casefold() Converts string into lower case center() Returns a centered string count() Returns the number of times a specified value occurs in a string encode() Returns an encoded version of the string endswith() Returns true if the string ends with the specified value expandtabs() Sets the tab size of the string find() Searches the string for a specified v...

林墐佩java

圖片

林墐佩canvas與svg繪圖

canvas繪圖套件繪製選擇權到期日損益圖 林墐佩買入選擇權到期日損益 林墐佩賣出選擇權到期日損益 w3schools練習canvas Your browser does not support the HTML canvas tag. w3schools練習svg Note: strong-強調 複製自"https://www.w3schools.com/graphics/tryit.asp?filename=trysvg_ellipses"

林墐佩金融市場158至170數學符號輸入-math

除權前一天60除權2元股票股利+3元現金股利的開盤參考價 除權息前一天價值=除權息當天價值 60=3+(1+ 2 10 )x=1.2x⇒x= 60-3 1+0.2 =47.5 除權前一天60除權2元股票股利+3元現金股利的開盤參考價 除權息前一天價值=除權息當天價值 60=3+x⇒x=57 除權前一天60除權2元的開盤參考價 除權息前一天價值=除權息當天價值 60=(1+ 2 10 )x=1.2x⇒x= 60 1+0.2 =50 信用戶維持率 fraction分數 融資戶維持率= 融資購買股票現在的價值 融資的金額 division軍團區塊 融券維持率= 放空股票的金額+保證金 放空股票的現在價值 整戶維持率=上面分子加分子 / 分母加分母

林墐佩JavaScript物件Object

圖片
拷貝甲班 identifier名稱,身分證id card w3schools學物件 林墐佩w3school練習截圖 wikipedia括號brackets 圓括弧 (英語: parentheses 或英語: round brackets ),中文中又稱 小括弧 、 括弧 。 半形  : ( ) 全形  : ( ) 方括弧 (英語: brackets 或英語: square brackets ),中文中又稱 中括弧 。 半形 : [ ] 全形: [ ] 花括弧 (英語: braces ,或英語: curly brackets ), 中文中又稱 大括弧 。 半形: { } 全形: { } 角括弧 (英語: chevrons 或英語: angle brackets ),中文中又稱為 尖括弧 。 半形 : ⟨ ⟩ ,在英文中指示想到而未說的話語,但經常由 小於號 ( < )和 大於號 ( > )代替 。 全形 : 〈 〉 ,在中文中用作 單書名號 雙角括弧(英語: double angle brackets ),中文中又稱為 雙尖括弧 。 半形: ⟪ ⟫ 全形: 《 》 ,在中文中用作 雙書名號 心得 delete物件的屬性;增加物件band["singer"]=... canvas繪圖套件繪製選擇權到期日損益圖

林墐佩w3schools物件object亂數random

林墐佩JavaScript語言Math數學方法(內建函數) Math.random()亂數Method產生0(含)到7(不含) Math.floor()無條件捨去Method Math.ceil()進位Method Math.round()四捨Method 輸入數字N 林墐佩執行 script 程式部分 function abc(){ let n = document.getElementById("n").value; let x = Math.random()*n; ...}