+ 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 Answers
+ 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