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:

  1. weight = float(input('Weight: '))
  2. height = float(input('Height: '))
  3. bmi = weight / height**2
  4. print(f'BMI: {bmi:.1f}')