Put in order · Python course · Module 1: Python Basics
BMI Calculation
Order the steps of a BMI calculator:
Items to put in order
- bmi = weight / height**2
- weight = float(input('Weight: '))
- height = float(input('Height: '))
- print(f'BMI: {bmi:.1f}')
Show the answer
Correct order:
- weight = float(input('Weight: '))
- height = float(input('Height: '))
- bmi = weight / height**2
- print(f'BMI: {bmi:.1f}')