New course! Every coder should learn Generative AI!
Try a free lesson0
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")
6 Answers
+ 2
I did wath you said but it gives a
SyntaxError: invalid charector in identifier
+ 2
Thanks it worked I did this
I chaged weight/height to weight/height**2
And it worked
Thanks I will be your follower
+ 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
+ 1
And I was just printing it to verify
+ 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")
+ 1
Ok I remember it