0
I don't understand what's it's Bad un this proyect
In this proyect the question it's create one BMI caculator: #your code goes here after=input("what's is your weigth:") later=input("what's is your heigth:") uno=float(later) heigth=int(round(uno)) weigth=int(after) variable=weigth/(heigth**2) if variable <18.5: print ("Underweigth") elif variable>=18.5 and variable <25: print ("Normal") elif variable>=25 and variable<30: print ("Overweigth") elif variable>30: print ("Obesity")
3 Respuestas
+ 6
elif variable>=30:
print ("Obesity")
# or
else:
print ("Obesity")
# Keep learning & happy coding :D
+ 4
there are some typos in weight and height. check the variable names and also the strings for output
you can also do the input in one line by converting the value to the required data type:
weight = int(input())
height = float(input())
#uno=float(later) <<< remove this
#heigth=int(round(uno)) <<< remove this
#weigth=int(after) <<< remove this
variable=weight/(height**2)
if variable <18.5:
print ("Underweight")
elif variable>=18.5 and variable <25:
print ("Normal")
elif variable>=25 and variable<30:
print ("Overweight")
elif variable>30:
print ("Obesity")
+ 1
But this question in the proyect is Tracking your BMI is a useful way of checking if you’re maintaining a healthy weight. It’s calculated using a person's weight and height, using this formula: weight / height²
The resulting number indicates one of the following categories:
Underweight = less than 18.5
Normal = more or equal to 18.5 and less than 25
Overweight = more or equal to 25 and less than 30
Obesity = 30 or more
Let’s make finding out your BMI quicker and easier, by creating a program that takes a person's weight and height as input and outputs the corresponding BMI category.
Sample Input
85
1.9
Sample Output
Normal