Python入門(二)

上篇我們安裝了Python開發環境,本篇我們來體驗一下Python的用法。 下面我們通過一個小demo,感受一下Python的寫法。   我們寫一個計算BMI指數的小程序: class Peason: def BMI(self,height,weight): try: value = weight / (height * height)
相關文章
相關標籤/搜索