Skip to content

Commit f169f68

Browse files
authored
update
1 parent f6208c4 commit f169f68

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Intro to Python for Data Science/NumPy - Chapter 4.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,16 @@
3333
#---------------------------------------------------------------------------------------------------#
3434

3535
#Baseball player's BMI
36-
# height and weight are available as a regular lists
36+
# height_in and weight_lb are available as regular lists
3737

3838
# Import numpy
3939
import numpy as np
4040

41-
# Create array from height with correct units: np_height_m
42-
np_height_m = np.array(height) * 0.0254
41+
# Create array from height_in with metric units: np_height_m
42+
np_height_m = np.array(height_in) * 0.0254
4343

44-
# Create array from weight with correct units: np_weight_kg
45-
np_weight_kg = np.array(weight) * 0.453592
44+
# Create array from weight_lb with metric units: np_weight_kg
45+
np_weight_kg = np.array(weight_lb) * 0.453592
4646

4747
# Calculate the BMI: bmi
4848
bmi = np_weight_kg / np_height_m ** 2

0 commit comments

Comments
 (0)