Learn to code with step-by-step lessons. A place for students to work through programming fundamentals and build skills.
Body mass index is weight / (height × height) with weight in kg and height in metres.
Ask for height and weight. If height or weight is not positive, print an error and ask again until both are positive.
Then print a category:
Skills: while validation loop, if / elif, floats.