+ 7

Hello everyone. Help build a BMI calculator . Please

15th Feb 2021, 8:38 AM
🇺🇿👨‍💻OG'ABEK🔥🇺🇿
🇺🇿👨‍💻OG'ABEK🔥🇺🇿 - avatar
24 Respuestas
+ 5
weight=int(input()) height=float(input()) BMI=weight/(height/100)**2 if bmi<18.5: print("Underweight") elif bmi>=18.5 and bmi<25: print("Normal") elif bmi>=25 and bmi<30: print("Overwight") else: print("Obesity")
26th Sep 2022, 11:31 PM
Modester Muchekecha
Modester Muchekecha - avatar
+ 12
Post your attempt first
15th Feb 2021, 8:41 AM
Slick
Slick - avatar
+ 9
Thanks 🔥🔥👍👍😊😊
16th Feb 2021, 1:27 PM
🇺🇿👨‍💻OG'ABEK🔥🇺🇿
🇺🇿👨‍💻OG'ABEK🔥🇺🇿 - avatar
+ 9
#your code goes here weight = int(input()); height = float(input()); bmi = weight/float(height*height); if bmi<18.5: print('Underweight') elif bmi>=18.5 and bmi<25: print("Normal") elif bmi>=25 and bmi<30: print('Overweight') else: print('Obesity') This will works
17th Feb 2021, 3:06 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 7
Height=float(input()) Weight=float(input()) x= "BMI" x = Height/Weight ** 2 if x<18.5: print("Underweight") elif x>=30: print("Obesity") elif x>=18 and x<25: print("Normal") elif x>=25 and x<30: print("Overweight")
16th Feb 2021, 1:24 PM
Luxmi
Luxmi - avatar
+ 6
Thank you all 😊😊😊
15th Feb 2021, 11:19 AM
🇺🇿👨‍💻OG'ABEK🔥🇺🇿
🇺🇿👨‍💻OG'ABEK🔥🇺🇿 - avatar
+ 5
Thank you bro😊😊👍🔥
15th Feb 2021, 1:26 PM
🇺🇿👨‍💻OG'ABEK🔥🇺🇿
🇺🇿👨‍💻OG'ABEK🔥🇺🇿 - avatar
+ 4
Thank you sister 😊😊😊
17th Feb 2021, 4:34 AM
🇺🇿👨‍💻OG'ABEK🔥🇺🇿
🇺🇿👨‍💻OG'ABEK🔥🇺🇿 - avatar
+ 3
Use the formula : BMI = (weight in kg) / (square of the height in m)
15th Feb 2021, 10:31 AM
Sonic
Sonic - avatar
+ 3
∆BH∆Y you can't write "height in m**2" because the units of height are metres and not square metres.
15th Feb 2021, 7:19 PM
Sonic
Sonic - avatar
+ 3
∆BH∆Y by writing (height in m)**2 we signify that we're squaring the value of height expressed in units of metres. If you write (height in m**2) you're saying that the units of height are square metres, which is wrong.
15th Feb 2021, 7:23 PM
Sonic
Sonic - avatar
+ 3
# your code starts here ... Weight = int(input()); Height = float(input()); Bmi = Weight / (Height ** 2); if Bmi < 18.5: print("Underweight") elif 18.5 <= Bmi < 25: print("Normal") elif 25 <= Bmi < 30: print("Overweight") else: if Bmi >= 30: print("Obesity") #No biggie!All programs create bugs.Go back and squash them .
30th Jan 2022, 4:23 PM
Vadakapuram. Kavya.
Vadakapuram. Kavya. - avatar
+ 2
∆BH∆Y by "(height in m) **2", what I meant was the square value of the height in metres. I have rephrased my answer if it confused you.
15th Feb 2021, 7:17 PM
Sonic
Sonic - avatar
+ 2
∆BH∆Y no problem 👍
16th Feb 2021, 6:17 AM
Sonic
Sonic - avatar
+ 2
weight = int(input()); height = float(input()); bmi = float(weight/(height**2)) if bmi<18.5: print('Underweight') elif bmi>=18.5 and bmi<25: print("Normal") elif bmi>=25 and bmi<30: print('Overweight') else: print('Obesity')
15th Jul 2021, 12:42 PM
Eren Der Teufel
Eren Der Teufel - avatar
+ 1
Most welcome bro🙏👍
17th Feb 2021, 9:39 AM
❤️😍Prerana😍❤️
❤️😍Prerana😍❤️ - avatar
+ 1
🥇🏆🥇💯💯👍🏻👍🏻
19th Aug 2021, 12:06 PM
PRO programmer
PRO programmer - avatar
+ 1
#your code goes here weight=int(input()) height=float(input()) BMI=weight/(height*height) if BMI<18.5: print("Underweight") if BMI >= 18.5 and BMI<25: print ("Normal") if BMI >=25 and BMI<30: print ("Overweight") if BMI >=30: print ("Obesity")
22nd Mar 2022, 11:22 PM
Dylan Comfort
Dylan Comfort - avatar
+ 1
hello, question here is how i wrote my code: weight = int(input()) height = float(input()) x = (weight/(height**2)) if x < 18.5: print ("Underweight") elif x >= 18.5 and x < 25: print("Normal") elif x>= 25 and x < 30: print("Underweight") elif x >=30: print("Obesity") but this code did not pass the third test case. can someone explain why? i am seeing some codes wrote their BMI differently than mine as well mine:x = (weight/(height**2)) others:BMI=weight/(height*height), Bmi = Weight / (Height ** 2);, bmi = float(weight/(height**2)) can someone explain the difference?
26th Apr 2022, 3:19 PM
natalia
+ 1
weight = int(input()) height = float(input()) x = "BMI" i = weight/height**2 if i < 18.5: print("Underweight") elif i > 18.5 and i < 25: print("Normal") elif i >= 25 and i < 30: print("Overweight") else: print("Obesity")
25th Aug 2022, 8:55 AM
Hi I'm Allen
Hi I'm Allen - avatar