Alguno me podría decir por qué me genera error este codigo | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Alguno me podría decir por qué me genera error este codigo

x=3 while(x==3) : Pes = (float (input("ingrece el peso: "))) Alt = ( float (input("ingrece la altura: "))) Imc=(Pes/(Alt**2)) if Imc>0 and Imc<18.5 : print("Underweigth") elif Imc>=18.5 and Imc <=24.9 : print("Normal") elif Imc>=25 and Imc <=29.9 : print("Overweigth") elif Imc>=30 : print("Obesity")

10th Sep 2022, 3:09 PM
cesar polania
cesar polania - avatar
2 Answers
+ 2
Es algo complicado decirte con exactitud qué provocó el error sin saber qué dice el mismo. Nos podrías facilitar esa información?
10th Sep 2022, 3:38 PM
Tyler McKechnie
0
Remove the first two lines. The while loop isn't necessary and if x doesn't change it will loop forever.
10th Sep 2022, 4:57 PM
Paul
Paul - avatar