{}
CODE VISUALIZER
Learn DSA the way it should be — with step-by-step code visualization.
Try now!
CODE VISUALIZER
Learn DSA with step-by-step code visualization.
Try now!
run-icon
main.py
print("Hello, Welcome to the BMI Calculator. Please answer a few question.") x = int(input("What is your age")) if x>=18: print("Sorry this Calculator is not made for you.") if x<=18: m = int(input("What is your height in centimetres?")) w = int(input("What is your weight in kilograms?")) y=m/100 h = y*y bmi = w/h print("Your BMI is", bmi) g = input("Do you want to know the details about you bmi? Answer using yes or no") print("THE INFORMATION THAT IS SHARED FROM NOW ON IS ONLY FOR MEDICAL PURPOSES AND NOT TO OFFEND ANYONE") if g=="no": print("Ok, Thank you for using our Calculator.") if g=="yes": if bmi<15: print("underweight.") if 15<=bmi<85: print("Normal weight") if 85<=bmi<97: print("Overweight.") if bmi>=97: print("Obese.") else: print("Thank You")
Output