elizeub

Calculadora de IMC em python

Jul 11th, 2021 (edited)
860
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.87 KB | None | 0 0
  1. #Este aplicativo calcula seu imc
  2. #Criado por Elizeu Barbosa Abreu
  3.  
  4. print("\n   CALCULADORA IMC \n")
  5.  
  6. peso = float(input("\nSeu peso em Kg \n(Ex.: 57.800): "))
  7. altura = float(input("\nSua altura em Metros \n(Ex.: 1.92): "))
  8. imc = round(peso/(altura*altura), 2)
  9. print("\n-----------RESULTADO--------------")
  10.  
  11. if imc < 18.5:
  12.     print("I.M.C: {} \nAbaixo do peso".format(imc))
  13. if imc >= 18.5 and imc <= 24.9:    
  14.     print("I.M.C: {} \nPeso Ideal".format(imc))
  15. if imc >= 25 and imc <= 29.9:
  16.     print("I.M.C: {} \nSobrepeso".format(imc))
  17. if imc >= 30 and imc <= 34.9:
  18.     print("I.M.C: {} \nAlerta: OBESIDADE GRAU 1".format(imc))
  19. if imc >= 35 and imc <= 39.9:
  20.     print("I.M.C: {} \nAlerta: OBESIDADE GRAU 2".format(imc))
  21. if imc > 40:
  22.     print("I.M.C: {} \nAlerta: OBESIDADE GRAU 3 OU MORBIDA\nProcure ajuda medica".format(imc))
  23. print("----------------------------------")
Add Comment
Please, Sign In to add comment