create uebung folder
This commit is contained in:
12
uebung/bmi.py
Normal file
12
uebung/bmi.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# Calculate your Body-Mass-Index with Python
|
||||
print("BMI - Calculator!")
|
||||
|
||||
weight_str = input("Please insert your weight (in kg): ")
|
||||
height_str = input("Please insert your bodys height(in m): ")
|
||||
|
||||
weight = float(weight_str.replace(",", "."))
|
||||
height = float(height_str.replace(",", "."))
|
||||
|
||||
bmi = weight / height ** 2
|
||||
|
||||
print("Your BMI is: " + str(round(bmi, 1)))
|
||||
Reference in New Issue
Block a user