# Problem with 1st Assignment's 1st Problem

Hello, I am New In Coding also In Python.so i have been facing some problem in python.
I write Down my codes for 1st problem of st Assignment.
but in last 2 and 3rd “If” condition, I faced some problem.
this “If” condition not work properly,so help to solve.

print(“hello”)
print(“welcome “+ p_name.upper()+” in our Clinic”)
p_weight=input("Enter your weight in kgs:- ")
weight_int=int(p_weight)
preference=input("preferred unit of height,Type F for feet and M for meters:- ")
p=preference.upper()
print("for measuring hight,your prefered unit is:- " +p)
if preference is “F”:
a=int(input("You will enter your height given as feet and inches. First enter feet:- “))
b=int(input(“Enter inches:- “))
c=(a*12)+b
d=c/39.37
print(“your hight is " +str(d)+” meter”)
else:
d=float(input(“What is your height in meters:-”))
print(p_name +” your BMR is :-”)
bmi=weight_int/d**2
print(bmi)
if bmi<18.5:
print(“UNDERWEIGHT”)
if bmi>18.5<25:
print(“NORMAL”)
if bmi>25<30:
print(OVERWEIGHT)
else:
print(“VERY-OVERWEIGHT”)

If you want to check whether a value is between some range, you must write it as :

``````if a>18.5 and a<25:
print("Normal")
``````

Use the same for places where it’s needed.

1 Like