0
BMI calculator - I am stuck, help needed
I am learning Phyton now, so I need help from you guys, who has passed all the quizzes over there. I am stuck with BMI calculator. This code works on my laptop but not here. What is the problem, could you please help/tell me đ Thanks in advance đ¸đ¸đ¸ weight = int(input("Enter your weight in kg: ")) height = float(input("Enter your height in meters: ")) x = weight/height**2 if x<18.5: print("Underweight") elif 18.5<=x<25: print("Normal") elif 25<=x<30: print("Overweight") elif x>=30: print("Obesity") print(x)
4 Answers
+ 3
Mia
I tested your code and noted that you are also outputting the value of x, which is not required.
try deleting print(x)
+ 1
Mia
Sololearn server will be printing your prompt inputs.
Remove the prompts & give a pure input should resolve your issue
IE:
weight = float(input())
height = float(input())
+ 1
Unfortunately, this is not working as well 𤡠But thank you for your answer Rik Wittkopp đ
+ 1
Rik Wittkopp yay đ it worked. Thank sooooo much for your help đ¤ đ