0
Help with - IMP test problem in python.
Help with - IMP test problem in python. The code works in: PyCharm, but doesn't work in sololearn, Error : "Line 12 (invalid character in identifie" My cod: # I M T #weight a = int(input("Please enter weight:")) #height b = float(input("Please enter height:")) #formul int = a/(b**2) print("ŃĐ°ŃŃŃŃŃ ĐșĐŸŃ. ĐČĐ”ŃĐ° : " + str(int)) #tested if int < 18.5:    print("Normal") elif int > 18.5 and int <=25:    print("Underweight") elif int >= 25 or int <= 30:    print("Overweight") else:    print("Obesity")
3 Answers
+ 4
Valmak ,
the issue of your code is the appearance of some (13) unicode character \xa0 => NO-BREAK SPACE. i have converted the code, so you can try it without re-typing it:
another hint:
these conditions looks like they are mixed up: (check all conditions if they are ok)
if int < 18.5:
print("Normal")
elif int > 18.5 and int <=25:
print("Underweight")
https://code.sololearn.com/cvZkux5bLHWY/?ref=app
+ 1
#your code goes here
weight = int(input())
height = float(input())
BMI = weight/height**2
if BMI < 18.5:
print("Underweight")
elif BMI >= 18.5 and BMI < 25:
print("Normal")
elif BMI >= 25 and BMI < 30:
print("Overweight")
elif BMI >= 30:
print("Obesity")
https://code.sololearn.com/cDQGCYxXqk25/?ref=app
+ 1
It's in the error. When you copy and paste code, you may be copying invisible characters. In each print statement line there are invisible characters. Rewrite it, or delete the characters