subject

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'. 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()

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:10, lberman2005p77lfi
The total cost of textbooks for the term was collected from 36 students. create a histogram for this data. $140 $160 $160 $165 $180 $220 $235 $240 $250 $260 $280 $285 $285 $285 $290 $300 $300 $305 $310 $310 $315 $315 $320 $320 $330 $340 $345 $350 $355 $360 $360 $380 $395 $420 $460 $460
Answers: 2
image
Computers and Technology, 24.06.2019 10:00, noahmace
When writing a business letter, how many times can you use the same merge field in a document? once once, unless using the address block feature unlimited it will depend on the type of document you choose
Answers: 1
image
Computers and Technology, 24.06.2019 14:00, maddi0132
In the microsoft® access® and microsoft excel® programs, the ribbon contains tabs that are divided into with like tools in them. parts groups containers bunches
Answers: 1
image
Computers and Technology, 25.06.2019 08:00, who0fade
Ais the hardware where the data is actually stored.
Answers: 1
You know the right answer?
Run the follwoing codes to get the output figure. Then change to codes to generate a histogram to sh...

Questions in other subjects: