#1
Run the follwoing codes to get the output figure. Then change to codes to generate a histogram to show age data distribution around 50 with the number of 100 bins. After that, save the histogram to be 'png'.

 
Code:
[align=justify] [/align]
[code]
import matplotlib.pyplot as plt import numpy as np np.random. seed(5) ages = [np.random.normal(loc=40,scale=10) for x in range(100)] #ages distributed around 40 distributed around 40 plt.hist(ages,bins=45) #bins is the number of bars plt.title("Ages per Population") plt.xlabel("ages") plt.ylabel("# of people") plt.show()
 

 
[/code]