慕課網python學習筆記6

認識函數 round(a,2)函數將a保留小數點後兩位 還可以進行四捨五入的功能 如何快速瞭解內置函數功能的方法 python —help(round)回車 敲擊鍵盤的回車可以翻頁 import this 打印出python之禪 函數的特性: 1、功能性 2、隱藏細節 3、避免編寫重複的代碼 組織代碼 函數的定義及運行特點 1、函數的結構:def funcname(parameter_list),
相關文章
相關標籤/搜索