Halloween Sale: Flat 70% + Addl. 25% Off + 30 Days Extra Lab on all Courses | Use Coupon HS25 in Checkout | Offer Expires In

  Enroll Now

Hands-on on Python Variables

Now we know the operations and variables in Python. Let's write a program to calculate the BMI.

BMI = weight / (height * height)

Here weight is in kg (kilogram) and height is in mt (meters)

INSTRUCTIONS
  • Define a variable height with value 1.7
  • Define a variable weight with value 72.25
  • Define a variable bmi and calculate the value of BMI using the above formula.
  • Convert bmi into int type.
  • Then print bmi using print(bmi). You should get 25 not 25.0.

No hints are availble for this assesment

Answer is not availble for this assesment


Note - Having trouble with the assessment engine? Follow the steps listed here

Loading comments...