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 < 100):
loopNumber+=1
c = (a+b)/2;
f = npv(c);
if ( abs(f) > maxerror and gap > maxerror):
if ( f>0 ):
a = c
else:
b = c
gap = b-a;
print('報酬率: ', c)
print('淨現值: ', f)
print('迴圈次數: ', loopNumber)
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...
清楚!https://yichen0617.blogspot.com/2025/06/youtube-video-player.html
回覆刪除