# BMI計算 ``` python= print("計算BMI") #告訴目的 weight=input("請輸入體重(公斤)") #取得體重 height=input("請輸入身高(公尺)") #取得身高 weight=float(weight) #為計算改變資料型態 height=float(height) #為計算改變資料型態 height2=height*height #計算 BMI=weight/height2 #計算 print(BMI) #印出結果 ``` ![](https://i.imgur.com/4AiDJyk.png)