print("######## Welcome to BMI calculator ########")time.sleep(1)
name = input("Please give me your name: \n")hieght = float(input("Enter your hieght in meters: \n"))weight = float(input("How much is your weight in Kg: \n"))
BMI = round(weight/(hieght * hieght),2)
def wait():
print("Let me calculate your BMI. Hold tight.")
print("-------------------------------------------------------------------")
print(". --> Calculating your BMI", name)
time.sleep(2)
print(".. --> Please wait", name)
time.sleep(2)
print(".. -->", name, "Just a second.")
print("-------------------------------------------------------------------")
time.sleep(2)
def mainfunc():
if (BMI < 18):
print(name, "You are seriously underweight. Your condition is critical as your BMI score is ", BMI)
elif (BMI >= 18 and BMI <= 18.5):
print(name, "Your weight is average. Try some healthy diet. Your BMI score is ", BMI)
elif (BMI > 18.5 and BMI <= 24.99):
print(name, "You have healthy weight as your BMI score is ",BMI)
elif (BMI > 24.99 and BMI < 30.00):
print(name, "You are slightly higher than required weight as your BMI score is ", BMI)
elif (BMI >= 30):
print(name, "!!! OVERWEIGHT !!! You seriously need to reduce your weight. Your BMI score is ", BMI)
wait()
mainfunc()
BMI Calculator python code
Latest posts
-
The Modern Private Cloud—What is VMware Cloud Foundation 9?
For over two decades, VMware transformed the data center by abstracting hardware into software. But as we entered the era of multi-cloud and AI, the challenge shifted from “how do I…
·
-
VCF 9 vs VVF: Which VMware Solution is Right for You?
Since the Broadcom acquisition, the VMware portfolio has undergone its most significant transformation in decades. For the “Virtual Maestro” community, the shift from hundreds of individual point products to two…
-
What is Virtualization-Based Security for Windows Guest Operating Systems
Virtualization-Based Security (VBS) for Windows guest operating systems is a security feature that uses hardware virtualization to create and isolate a secure region of memory from the normal operating system.…
·

Leave a comment