+ 1
Who can I solve test of BMI ?
It is an program to find Body Mass Index I made it but only one case is right at time and other one is showing wrong
13 ответов
0
Monu Yadav you don't need to know the test cases if you follow the instructions, so they are hidden for a reason. Pro users also can't see them
+ 1
they are hidden, as there are difficulties in checking all possible combinations, so the tests are selective and some are hidden, so that there is no manipulation of the results.
0
Hi! Can you show code attempt?
0
first of all, you should not directly specify the height and weight values. your program should prompt you to enter these values manually
0
And you forgot Overweight.
Also remove the spaces from output strings
0
And you forgot Overweight.
Also remove the spaces from output strings
as Benjamin said
- 1
Wait let me show you
- 1
weight = 1
height = 1.7
BMI=weight/height**2
if BMI < 18.5:
print ("Underweight ")
if BMI >= 18.5 and BMI < 25:
print (" Normal ")
if BMI >= 30:
print (" Obesity ")
- 1
How can it made 2 cases right at same time
- 1
weight = int(input())
height = float(input())
The test cases give the numbers for each test case via input
- 1
Have you paid subscription
- 1
Can you tell me third question of BMI it is locked in my course and it shows an error I don't know for what
- 1
make sure that you used the right operators like >= (greater or equal to) etc
make sure you use the right division type
also make sure you remember to square the height