File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Intro to Python for Data Science Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 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
3939import 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
4848bmi = np_weight_kg / np_height_m ** 2
You can’t perform that action at this time.
0 commit comments