bmi / app.py
Alex-23's picture
Create app.py
b3b6973
raw
history blame contribute delete
No virus
568 Bytes
weight = float(input("Εισαγάγετε το βάρος σας σε κιλά: "))
height = float(input("Εισαγάγετε το ύψος σας σε μέτρα: "))
# Calculate BMI
bmi = weight / (height ** 2)
# Print the result
print("Ο Δείκτης Μάζας Σώματος (ΔΜΣ) είναι: {:.2f}".format(bmi))
# Print a message based on the BMI value
if bmi < 18.5:
print("Είσαι λιποβαρής.")
elif bmi >= 18.5 and bmi < 25:
print("Είστε σε κανονικό βάρος.")
else:
print("Είστε υπέρβαρος.")