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
-
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.…
·
-
Export DRS (Distributed Resource Scheduler) rules from a vCenter server using PowerCLI-How to?
To export DRS (Distributed Resource Scheduler) rules from a vCenter server using PowerCLI, you can use the following script. This script will connect to your vCenter server, retrieve the DRS…
·
-
vSphere virtual disk transport modes (VADP) for VM backup
Virtual Disk Transport Methods (VADP) offers interfaces for integration of storage-aware applications, including backup, with efficient access to storage clusters. Backup vendors may use different transport methods, which provide efficient…
·
Get updates
Spam-free subscription, we guarantee. This is just a friendly ping when new content is out.

Leave a comment