+ 1

Que está mal en mi código?

Estuve 15 minutos intentando encontrar el error: peso = 85 altura = 1.9 if altura <= 18.5 print("underweird") if altura >= 18.5 print("normal") if altura >= 25.0 print("overweird") if altura >= 30 print("obesidad")

24th Jun 2021, 12:40 PM
AJDJ
AJDJ - avatar
2 Answers
+ 2
First use if-elif instead of if 2nd you need to put : at end of if statement #see code below . peso = float (input ()) altura = float (input()) if altura <= 18.5: print("Underweird") elif altura >= 18.5 : print("Normal") elif altura >= 25.0: print("Overweird") elif altura >= 30: print("Obesidad")
24th Jun 2021, 1:07 PM
Yash Wable 🇮🇳
Yash Wable 🇮🇳 - avatar
+ 1
Hi! Dont use direct values of peso and altura. Get it from user input. Answers in print write with uppercase first letters
24th Jun 2021, 1:09 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar