Why it don’t works? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

Why it don’t works?

I don’t understand, why it don’t works? I think, i wrote everything correct. https://code.sololearn.com/cIIk730mJUi9/?ref=app

27th Feb 2021, 8:20 PM
Flexik
Flexik - avatar
10 Respuestas
+ 3
Flexik Code should be like this😊 height = float(input()) weight = int(input()) if weight/height**2 < 18.5: print("underweight") elif 18.5 <= weight/height**2 < 25: print("normal") elif 25 <= weight/height**2 < 30: print("overweight") elif weight/height**2 > 30: print("obesity")
28th Feb 2021, 12:56 AM
Hasan Hüseyin Semiz
Hasan Hüseyin Semiz - avatar
+ 2
Hi! you are not using comparison operators together with logical operators correctly. starting from line 8, add an expression to the right-hand side after and. or the second option: put the expression in the middle, remove the logical operator and leave 18.5 and 25 on the sides
27th Feb 2021, 8:32 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
Привет! вы неправильно используете операторы сравнения вместе с логическими операторами. начиная со строки 8, добавьте выражение в правую часть после and. или второй вариант: поставьте выражение посередине, уберите логический оператор и оставьте 18.5 и 25 по бокам для сравнения
27th Feb 2021, 8:39 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
спасибо большое!
27th Feb 2021, 8:40 PM
Flexik
Flexik - avatar
0
добрый вечер!
27th Feb 2021, 8:38 PM
Flexik
Flexik - avatar
0
можете написать это по русски
27th Feb 2021, 8:38 PM
Flexik
Flexik - avatar
0
мой английский не очень
27th Feb 2021, 8:38 PM
Flexik
Flexik - avatar
0
Use google or yandex translator 😉
27th Feb 2021, 8:42 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
0
Ok
27th Feb 2021, 8:43 PM
Flexik
Flexik - avatar
0
Thanks!
28th Feb 2021, 7:24 AM
Flexik
Flexik - avatar