1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
masha68 [24]
3 years ago
6

Write a program that computes the minimum, maximum, average and standard deviation of the population over time for a borough (en

tered by the user). Your program should assume that the NYC historical population data file, nycHistPop.csv is in the same directory.A sample run of your program:
Enter borough: Staten Island
Average population: 139814.23076923078
Maximum population: 474558
and another run:

Enter borough: Brooklyn
Average population: 1252437.5384615385
Maximum population: 2738175
Computers and Technology
1 answer:
IrinaK [193]3 years ago
4 0

Answer:

import pandas as pd #importing pandas library as pd

import matplotlib.pyplot as plt #importing matplotlib.pyplot as plt

pop=pd.read_csv('nycHistPop.csv') #reading the csv file

borough=input('Enter borough name:') #asking the user for borough namme

# image=input('Enter image name:')

# pop['Fraction']=pop[borough]/pop['Total']

# pop.plot(x='Year', y='Fraction')

print("Minimum population",pop[borough].min()) #printing the minimum population of borough

print("Maximum population",pop[borough].max()) #printing the maximum population of borough

print("Average population",pop[borough].mean()) #printing the average population of borough

print("Standard deviation",pop[borough].std()) #printing the standard deviation of borough

# fig=plt.gcf()

# fig.savefig(image)

Explanation:

You might be interested in
Trevor got home from work and suddenly realized that he needed to edit a certain file stored in the company network's server. ho
gregori [183]

I believe the answer is Virtual Private Network (VPN).

Know this answer is late, but im doing my deed hoping i this can help someone else pass this darn class. Best of Luck to whoever is taking the same course. You can do it if my lazy self can do it! It'll be okay ;)

3 0
3 years ago
QUESTION: Which is not an example of a video port or cable?
Vikki [24]

Answer:

Radio Corporation of America (RCA)

Explanation:

A corporation is not a video connector.

8 0
3 years ago
Which of the following statements are true?
grin007 [14]

Answer:

I think the answer are two which are B and C

7 0
3 years ago
When Twitter is used to gather a large group for a face-to-face meeting it is called
Verdich [7]
The answer is flash mob. They called it flash mob when a large number of people in twitter gather in group for a centralized face to face meeting. In flash mob, people are gathering to be able to create a community that is helping each other or even just talking to each other.
8 0
3 years ago
A struck-by hazard can be described as anytime a worker ___________.
solong [7]
A...........................................
7 0
3 years ago
Read 2 more answers
Other questions:
  • An icon in a document preset that looks like the play button on a YT video, what type of document is the preset meant to be used
    13·2 answers
  • Storing a value in a variable<br> Exponent<br> Variable<br> Assignment<br> Operator
    13·1 answer
  • One of the most common uses of spreadsheet programs are communicating with others. O editing images and photos. O tracking and m
    8·2 answers
  • What does it mean when system ui has stopped?
    9·1 answer
  • What are two examples of management information systems?
    12·1 answer
  • How can you solve real world mathematical problems using two linear equations in two variables​
    11·1 answer
  • Help me find the difference between these logos
    10·2 answers
  • Danica is creating a flyer for her cookies that she will sell during her school fair. She wants to add a registered
    7·1 answer
  • Here's a better picture of my pc mouse and keyboard​
    5·2 answers
  • Types of Hazards Mitigation Measures
    8·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!