Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while True:
- # -*- coding: utf-8 -*-
- import time
- gewicht = input("geben sie ihr Gewicht bitte in kg an: ")
- groesse = input("geben sie ihre größe bitte in cm an: ")
- bmi = float(gewicht)/((float(groesse)/100)**2)
- if (bmi < 16):
- print("BMI von ", round(bmi,1), "-> Starkes Untergewicht")
- elif (bmi >= 16 and bmi < 17):
- print("BMI von ", round(bmi,1), "-> Mäßiges Untergewicht")
- elif (bmi >= 17 and bmi < 18.5):
- print("BMI von ", round(bmi,1), "-> Leichtes Untergewicht")
- elif (bmi >= 18.5 and bmi < 25):
- print("BMI von ", round(bmi,1), "-> Normalgewicht")
- elif (bmi >= 25 and bmi < 30): #sagt das wenn der bmi wert kleiner oder größer als eine bestimmte
- print("BMI von ", round(bmi,1), "-> Präadipositas") #Zahl ist die demendsprechende ausgabe ausgegeben werden soll
- elif (bmi >= 30 and bmi < 35):
- print("BMI von ", round(bmi,1), "-> Adipositas Grad I")
- elif (bmi >= 35 and bmi < 40):
- print("BMI von ", round(bmi,1), "-> Adipositas Grad II")
- else:
- print("BMI von ", round(bmi,1), "-> Adipositas Grad III")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement