BMI calculator
Task
The program reads a person's height in centimetres (a whole number) and weight in kilograms (it may be a decimal, for example 67.5), each on its own line. It prints:
- the body mass index BMI = weight / height² (height in metres) rounded to 2 decimal places,
- on the next line the category:
podvaha(underweight, BMI below 18.5),norma(normal, 18.5 to below 25),nadvaha(overweight, 25 to below 30) orobezita(obese, 30 and more).
What the program should do
For a height of 175 cm and a weight of 70 kg the BMI is 22.86, so norma.
Examples
Input
175 70
Expected output
22.86 norma
After you submit, 6 hidden tests will also check your solution: underweight, just below 25, overweight, just above 18.5, obese, a decimal weight.
Python starts the first time you run code.
Ctrl+Enter runs the program. Tab indents. Press Esc, then Tab, to leave the editor.
Input (stdin)
Each line = one call to input().
Output
Hints
Try it yourself first. Each hint reveals a little more - and lowers the reward a little.
Signed out, hints are free - but no XP is awarded either.
Solution
The solution unlocks after the last hint.