How to create BMI calculator in Python? Any advance level programmer can guide? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to create BMI calculator in Python? Any advance level programmer can guide?

12th Oct 2021, 3:43 PM
Muhammad Hassan yar
Muhammad Hassan yar - avatar
4 Answers
+ 5
Muhammad Hassan yar , are you talking about the code coach exercice from "python for beginners" tutorial? in this case: before we are going to help you, please present your attempt here. if you haven't done a try by yourself so far, please do so. create your code in playground and post the link to it here. please also provide a proper task description with sample of input and output. thanks!
12th Oct 2021, 3:47 PM
Lothar
Lothar - avatar
+ 1
Mladen please don't just give people the solution they don't learn that way. Also, the first condition in your code has to be >= 30 instead of > 30.
12th Oct 2021, 4:52 PM
Simon Sauter
Simon Sauter - avatar
0
Thanks bro
12th Oct 2021, 3:46 PM
Muhammad Hassan yar
Muhammad Hassan yar - avatar
- 1
weight = float(input()) height = float(input()) BMI = weight / height ** 2 if BMI > 30: print("Obesity") elif 30 > BMI >= 25: print("Overweight") elif 25 > BMI >= 18.5: print("Normal") else: print("Underweight")
12th Oct 2021, 3:45 PM
Devnull
Devnull - avatar