+ 2

weight = input() height = input() BMI = weight / (height ** 2) if BMI < 18.5: print(Underweight) elif BMI >= 18.5 and BM

What is the error in code

19th Jan 2022, 10:25 AM
đ‘«đ’‚đ’Œđ’”đ’‰ đ‘«đ’†đ’—đ’†đ’đ’đ’‘đ’†đ’“
đ‘«đ’‚đ’Œđ’”đ’‰ đ‘«đ’†đ’—đ’†đ’đ’đ’‘đ’†đ’“ - avatar
4 RĂ©ponses
+ 3
Put your code in a SCRIPT on sololearn playground If you paste it into the heading it GETS CUT OFF AND NOBODY CAN READ IT
19th Jan 2022, 10:33 AM
Lisa
Lisa - avatar
+ 2
I advise you to search 🔍 before post your question because there are many people asked the same question before https://www.sololearn.com/Discuss/2686011/?ref=app https://www.sololearn.com/Discuss/2748154/?ref=app
19th Jan 2022, 12:31 PM
Muhammad Galhoum
Muhammad Galhoum - avatar
+ 1
đ‘«đ’‚đ’Œđ’”đ’‰ đ‘«đ’†đ’—đ’†đ’đ’đ’‘đ’†đ’“ Even though your code is not completely represented, I noticed that your inputs will only generate strings. You need to generate a number, perhaps even a decimal number, so I suggest you modify you inputs to accept integers or floats
19th Jan 2022, 10:40 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
Muhammad As you can see from the OP's question, the present thread is about a BMI calculator in the Python course. It is by no means related to the Pythagoras theorem. Hence please do not post unrelated threads here.
19th Jan 2022, 12:36 PM
Lisa
Lisa - avatar