ANPstore

CODE PY HITUNG BMI

Oct 19th, 2023 (edited)
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. #FORM CODE LINK : https://pastebin.com/YUNtpSsw
  2. #Get variable via input and integer
  3. weight = int(input('BERAT BADAN    : '))
  4. height = float(input('TINGGI BADAN  :'))
  5. #Mencari Nilai w ÷ h^2
  6. w_h = weight / (height**2)
  7. #Getting Output
  8. print('Nilai BM : %.2f'%(w_h))
  9. if w_h < 18.5:
  10.     u = 'KURUS'
  11. elif w_h >= 18.5 and w_h <= 24.9:
  12.     u = 'NORMAL'
  13. elif w_h >= 25.0 and w_h < 29.9:
  14.     u = 'GEMUK'
  15. else: u = 'OBESITAS BERLEBIH'
  16. print('DALAM KONDISI',u)
Advertisement
Add Comment
Please, Sign In to add comment