黃冠霖風險管理蒙地卡羅模擬資產價格
- 获取链接
- X
- 电子邮件
- 其他应用
黃冠霖蒙地卡羅模擬資產價格
切割期數
此博客中的热门博文
w3schools字串slicing[::],str,len
w3schools 程式碼 #黃冠霖strings可以用單引雙引只要對稱 b = '狗吃屎,兔吃菜,貓抓鼠' # 0 1 23 4 5 678 9 10,11,12, print('字串長度' + str(len(b))) #len函數 字串長度 輸出 整數 #str函數 轉成字串 這樣才能串接 print(b[-5:-2]) #練習字串格式format quantity = "精華下午茶" itemno = 5 price = "黃冠霖" myorder = "我要吃 {} 吃幾個 {},和 {} 誰一起吃" print(myorder.format(quantity, itemno, price)) 字串的方法與函數w3schools https://www.w3schools.com/python/python_strings_methods.asp 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 value and returns the position of where it was found format() Formats specified values in a string format_map() Formats spec...
D00000黃冠霖JavaScript執行輸入字串再反向輸出JS Code編輯Java
JavaScript輸出結果 黃冠霖輸入字串: JavaScript程式碼 lt=less than; gt=greater than; <p>黃冠霖輸入字串:<input type="text" width="80" id="in"></p> <p><input type="button" value="黃冠霖執行JavaScript" onclick="f()"></p> <p id="out"></p> <script> function f(){ var a = document.getElementById("in").value;/*取得id=in的文字*/ var b = "源字串: "+a+"<br>長度是:"+a.length+"<br>反串是: "; var c = ""; for (var i = 0; i < a.length; i++) c = a.slice(i,i+1) + c ; b = b +"<font size=7>"+ c+"</font>"; document.getElementById("out").innerHTML = b; } </script> 微軟VS Code編輯Java程式
程式碼註解
Python 函數def 函數名稱: def draw(): canvas繪圖套件 create_line(x起點,y起點,x終點,y終點) def draw第二個delete def draw():#按下按鈕button1執行draw canvas.create_line(0,500,700,500,width=3,fill='black',arrow='last') canvas.create_line(10,600,10,5,width=3,fill='black',arrow='last') for firm in firms: t=(firm, year.get()) x = 10+20*stdev[t]*2*3**0.5 #放大20 y = 500 - 10*mean[t]*12 #放大10 dot=canvas.create_oval(x-5,y-5,x+5,y+5,fill='blue') lab=canvas.create_text(x+10,y,text=firm[4:7],anchor=W,font=('微軟中黑體', 16)) def delete():#按下按鈕button2執行delete canvas.delete('all') years=[x for x in range(2007, 2025)] year=IntVar(tk) year.set(years[0]) label = Label(tk, text="年度",font=('Arial',30,'bold'),).pack(side=LEFT) #距離左側 option1 = OptionMenu(tk, year, *years).pack(side=LEFT) button1 = Button(tk, text="賴青德繪圖 ",font=('Arial',30,'bold'), command = draw, bg='black...
https://gary20010101.blogspot.com/2025/04/pythoncsv.html
回复删除https://gary20010101.blogspot.com/2025/04/context-httpschema.html
蒙地卡羅https://gary20010101.blogspot.com/2025/04/blog-post.html