# area variables (in square meters)
hall = 11.25
kit = 18.0
liv = 20.0
bed = 10.75
bath = 9.50
# Adapt list areas
areas = ["hall", hall, "kitchen", kit, "living room", liv, "bedroon", bed, "bathroom", bath]
# Print areas
print(areas)
# area variables (in square meters)
hall = 11.25
kit = 18.0
liv = 20.0
bed = 10.75
bath = 9.50
# house information as list of lists
house = [["hallway", hall],
["kitchen", kit],
["living room", liv],
["bedroom", bed],
["bathroom", bath]]
# Print out house
print(house)
# Print out the type of house
print(type(house))
# Create list baseball
baseball = [180, 215, 210, 210, 188, 176, 209, 200]
# Import the numpy package as np
import numpy as np
# Create a numpy array from baseball: np_baseball
np_baseball=np.array(baseball)
# Print out type of np_baseball
print(type(np_baseball))
# Create a numpy array from height_in: np_height_in
np_height_in=np.array(height_in)
# Print out np_height_in
print(np_height_in)
# Convert np_height_in to m: np_height_m
np_height_m=np_height_in*0.0254
# Print np_height_m
print(np_height_m)
['hall', 11.25, 'kitchen', 18.0, 'living room', 20.0, 'bedroon', 10.75, 'bathroom', 9.5]
[['hallway', 11.25], ['kitchen', 18.0], ['living room', 20.0], ['bedroom', 10.75], ['bathroom', 9.5]]
<class 'list'>
<class 'numpy.ndarray'>
Execution error
NameError: name 'height_in' is not defined