發表文章

郭翊晨Python執行IRR

圖片
遷入郭翊晨解說影片 嵌入WIKIPEDIA二分法 pmt = [0,0,0,0] #郭翊晨程式設計586設定串列list pmt[0]=float(input('躉繳金額: ')) 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.000001 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)

郭翊晨二分法求內部報酬率

head/head, body/body畫蛇添足,可拿掉,因為部落格架構已經下這些命令 躉繳 第1期 第2期 第3期 注意,包含首期躉繳的現金流量都大於0。 輸出: 報酬率: 淨現值: 迴圈次數: 郭翊晨學習程式設計程式碼如下

郭翊晨python繪製三角函數與powerpoint製作影片

from tkinter import * #或者import tkinter as tk import math tk = Tk() #建構視窗名為tk tk.geometry('1200x400')#視窗 寬1200像素 tk.title("劉任昌python tkinter三角函數") canvas = Canvas(tk, width=1200, height=400, bg='black') canvas.grid(row=0,column=0,padx=5,pady=5,columnspan=3) delay=10 # milliseconds, 1/1000秒 x1,y1,z1=0,200,10#python特徵,多變數=對等值 h=190 #上下範圍,相當於數學1到-1 L1=canvas.create_line(0,200,1200,200,fill='white',width=5) def LH(): global x1, y1, z1#global全球,local當地 x2 = x1 + 1 #換到下個+1 y2=200 - h*math.sin(0.02*x2) z2=200 - h*math.cos(0.02*x2) L1=canvas.create_line(x1,y1,x2,y2,fill='pink',width=10) L2=canvas.create_line(x1,z1,x2,z2,fill='green',width=10) if (x2

Javascript函數sin,cos與canvas.font

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

Javascript函數sin,cos與canvas.font

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 201...

郭翊晨Javascript物件導向方法是物件的函數

物件導向設計 OOP 物件導向設計 OOP - Object-Oriented Programming 主詞 subject,受詞 object,東方叫 oriental 貓 狗 identity, 身分證 id card,division 區塊,段落 郭翊晨的按鈕 期中考心得 JAVASCRIPT的字典 dict =new Map([["2303","聯電"],["2330","台積電"],["2880","華南金"],['AAPL','蘋果公司'],['C','花旗銀行'],['T','美國電話電報']]);//宣告配對(字典) PYTHON的字典 dict ={"2303":"聯電","2330":"台積電","2880":"華南金",'AAPL':'蘋果公司','C':'花旗銀行','T','美國電話電報'}