簡單計算機 7 8 9 + 4 5 6 - 1 2 3 * 0 C / = 教學影片 FRAME框架SRC=SOURCE來源改成維基百科 維基百科PYTHON說明 python array陣列的方法 Method Description append() Adds an element at the end of the list clear() Removes all the elements from the list copy() Returns a copy of the list count() Returns the number of elements with the specified value extend() Add the elements of a list (or any iterable), to the end of the current list index() Returns the index of the first element with the specified value insert() Adds an element at the specified position pop() Removes the element at the specified position remove() Removes the first item with the specified value reverse() Reverses the order of the list sort() Sorts the list python array方法撰寫模式貼上 ...
嵌入劉任昌解說影片 嵌入呂婕綺錄製影片 呂婕綺的截圖 心得 這學期學會網路程式語言JAVASCRIPT也學會人工智慧使用最多的PYTHON語言 以下程式碼 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.00000001 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)
留言