Python Variables
💡
Exercise 8

BMI 15 XP Easy

Ctrl+Enter Run Ctrl+S Save

Let's practice more arithmetic! BMI (Body Mass Index) is calculated with this formula:

bmi = weight / (height ** 2)

Where weight is in kilograms and height is in meters.

The operator raises a number to a power. So height 2 means height squared.

📋 Instructions
Create two variables: - `weight` = `68` (kg) - `height` = `1.65` (meters) Calculate the BMI and print the result: ```python bmi = weight / (height ** 2) print(bmi) ``` Expected output: ``` 24.977043158861392 ```
BMI formula: weight / (height ** 2). Remember height is in meters. Use round() to round to a specific number of decimal places.
⚠️ Try solving it yourself first — you'll learn more!
bmi = weight / (height ** 2)
🧪 Test Cases
Input
Run your code
Expected
24.977043158861392
Expected program output
main.py
Hi! I'm Rex 👋
Output
Ready. Press ▶ Run or Ctrl+Enter.