Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions 03_bmi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
class Mybmi:
height=float(input("Enter the height in metres"))
weight=int(input("Enter the weight in kilograms"))
bmi=weight/(height*height)
print("The BMI of the user",bmi)
if bmi<=15:
print("The user is under weight")
elif (bmi>15 and bmi<=20):
print("The user is normal")
else:
print("obese")
if __name__ == '__main__':
a = Mybmi()