+ 3

Python bmi calculator

Hello, my code worked on pc but it doesn't in the app test. Any ideas plz

19th Oct 2021, 2:11 PM
Abou Michel
6 odpowiedzi
+ 4
Abou Michel , there are still some issues. i have marked them with comments: https://code.sololearn.com/cMTEfxXhwsup/?ref=app
19th Oct 2021, 4:58 PM
Lothar
Lothar - avatar
+ 2
Show us the code please
19th Oct 2021, 2:17 PM
Chloe
Chloe - avatar
+ 2
w = int(input("weight: ")) h = float(input("height: ")) x = w / (h*h) print(x) if x < 18.5: print ("underweight") elif x >= 18.5 and x < 25: print ("normal") elif x >= 25 and x < 30: print ("overweight") else: if x >= 30: print ("Obesity")
19th Oct 2021, 2:20 PM
Abou Michel
+ 2
SL is case sensitive, meaning if your code outputs "underweight" instead of "Underweight", it marks as wrong
19th Oct 2021, 2:22 PM
Chloe
Chloe - avatar
+ 1
Okay tnx
19th Oct 2021, 2:26 PM
Abou Michel
+ 1
I did what you told me to do. Am confused test 1 nd test 2 the output is right but marked as wrong Same problem i have in search engine test
19th Oct 2021, 3:32 PM
Abou Michel