Guest User

Untitled

a guest
May 23rd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. File "bmi.py", line 1, in <module>
  2. while true:
  3. NameError: name 'true' is not defined
  4.  
  5. while true:
  6. height=input("身長(m)?:")
  7. if len(height)==0:
  8. break
  9. height=float(height)
  10. weight=float(input("体重(kg)?:"))
  11. bmi=weight/pow(height,2)
  12. print("BMI値は{:.1f}です。".format(bmi))
  13. if bmi<18.5:
  14. print("Mr.ガリガリ君")
  15. elif 18.5<=bmi<25.0:
  16. print("中肉中背THEふつう君")
  17. elif 25.0<=bmi<30.0:
  18. print("デブ")
  19. else:
  20. print("末期のデブ")
Add Comment
Please, Sign In to add comment