python for begginers Control flow code project BMI Calculator answer | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

python for begginers Control flow code project BMI Calculator answer

I want the answer of python for beginners Control flow code project answer because I tested my code on m,y own and it is working properly but sololearn is telling me that it is wrong can anybody please give the answer that sololearn accepts this is the code that ti wrote #your code goes here wieght = float(input()) hieght = float(input()) hp = wieght/hieght print(hp) if hp<18.5: print("Underweight") elif hp>=18.5and hp<25: print("Normal") elif hp>=25and hp<30: print("Overweight") else: print("Obesity")

2nd Mar 2022, 9:53 AM
Rubain M Riyam
Rubain M Riyam - avatar
6 Answers
+ 2
I did wath you said but it gives a SyntaxError: invalid charector in identifier
4th Mar 2022, 9:52 AM
Rubain M Riyam
Rubain M Riyam - avatar
+ 2
Thanks it worked I did this I chaged weight/height to weight/height**2 And it worked Thanks I will be your follower
5th Mar 2022, 8:04 AM
Rubain M Riyam
Rubain M Riyam - avatar
+ 1
I didn't get you but in the course python for beginners it said to take the weight and height of the user and divide And check the number which type it matches Underweight,Normal, Overweight or Obesity And if bit matches any of this then print that types name Please check the question in sololearn python for beginners control flow code project BMI Calculator And please give me the answer and please explain the question as well
2nd Mar 2022, 2:19 PM
Rubain M Riyam
Rubain M Riyam - avatar
+ 1
And I was just printing it to verify
4th Mar 2022, 9:51 AM
Rubain M Riyam
Rubain M Riyam - avatar
+ 1
this is the code #your code goes here weight = float(input()) height = float(input()) hp = weight/height² print(hp) if hp<18.5: print("Underweight") elif hp>=18.5and hp<25: print("Normal") elif hp>=25and hp<30: print("Overweight") else: print("Obesity")
4th Mar 2022, 10:20 AM
Rubain M Riyam
Rubain M Riyam - avatar
+ 1
Ok I remember it
5th Mar 2022, 7:55 AM
Rubain M Riyam
Rubain M Riyam - avatar