Quotes help make search much faster. Example: "Practice Makes Perfect"

Friday, August 30, 2019

Codecademy Learn Statistics With Python Median Exercise 2/4


# Sample Solution
import numpy as np

# Array of the first five author ages
five_author_ages = np.array([29, 49, 42, 43, 32])

# Fill in the empty array with the values sorted
sorted_author_ages = np.array([29, 32, 42, 43, 49])

# Save the median value to median_value
median_age = 42

# Print the sorted array and median value
print("The sorted array is: " + str(sorted_author_ages))
print("The median of the array is: " + str(median_age))

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts