# BMI計算 ``` python= print("計算BMI") #告訴目的 weight=input("請輸入體重(公斤)") #取得體重 height=input("請輸入身高(公尺)") #取得身高 weight=float(weight) #為計算改變資料型態 height=float(height) #為計算改變資料型態 height2=height*height #計算 BMI=weight/height2 #計算 print(BMI) #印出結果 ``` 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up