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
What is are the html tags plss anyone​
sineoko [7]

Answer:

Each tag starts with a tag opener (a less than sign) and ends with a tag closer (a greater than sign).

Explanation:

Each tag starts with a tag opener (a less than sign) and ends with a tag closer (a greater than sign). Many tags have corresponding closing tags which identical except for a slash after the tag opener. (For example, the TITLE tag).

Some tags take parameters, called attributes. The attributes are given after the tag, separated by spaces. Certain attributes have an effect simply by their presence, others are followed by an equals sign and a value. (See the Anchor tag, for example). The names of tags and attributes are not case sensitive: they may be in lower, upper, or mixed case with exactly the same meaning. (In this document they are generally represented in upper case.)

Currently HTML documents are transmitted without the normal SGML framing tags, but if these are included parsers will ignore them.

7 0
3 years ago
Which model states that the people and the environment for communication are constantly changing? A. linear B. interactive C. tr
In-s [12.5K]

The interactive model of communication states that the people and the environment for communication are constantly changing.

B. interactive

<u>Explanation:</u>

The world is a big place and you must have come across the infamous hearing, "Change is the only constant". Gradually, with the passage of time, the mindset of the people change over a certain topic for communication.

For instance, in old times, people did not prefer their children to have love marriages, in fact India has also seen honor killings to prevent love marriages. But now most portion of the society stands in favor of love marriages. People change, perspective change, and so does the perception and ideas.

6 0
3 years ago
What can Marla enter into cell A11 to find out how much money is left in her budget and to make sure the cell is updated wheneve
Nookie1986 [14]
Personally I have my budget spreadsheet with all of my expenses in columns. Then I have a column showing my estimated paycheck (updating with actual# later).  Then the formula in the "Remaining" column that I use is this:    sum((A1:A99)-A100)  Where A1 through A99 (or whatever# of expenses you have) and -A100 or whatever cell name your paycheck/money is entered into - and that's all I do.  I actually have a 3 year budget, including birthdays, holidays, vacations, etc. so that you can plan ahead for any expenses and save away any extra.
8 0
3 years ago
2. Assuming that the bits in an integer are numbered from 0, from right (least significant) to left (most significant), write an
3241004551 [841]

Answer:

Explanation:

Two ways of interpreting this question

(I) Shifting all the bits along with the choosen four,

in that case it will be i1>>2;

(ii) Just shifting the choosen four bits and keeping the remaining as it is.

It is equivalent to replacing the first four bits of i1 with i1>>2. let us call N = i1, and M = i1>>2.

max = ~0 //All one's

//1's through position 4, then all zeros

left = max - ((1<<4) - 1);

So we just have zeros between bits one to four and other are one.

Now final step;

(N&left) | m

4 0
3 years ago
1.
Umnica [9.8K]

Answer:

B

Explanation:

trust

7 0
3 years ago
Other questions:
  • What company handles security for a lot of the e-commerce on the internet and also maintains two root name server clusters?
    8·1 answer
  • Why is timbre an important musical element?
    7·2 answers
  • write an algorithm that gets the price for item A plus the quantity purchased. The algorithm prints the total cost, including a
    5·1 answer
  • How do you enter the command prompt on Chromebook
    10·1 answer
  • What do you think is the meaning of the saying "Sticks and stones may break my bones, but words can never hurt me"? Do think tha
    5·1 answer
  • Imagine you had a learning problem with an instance space of points on the plane and a target function that you knew took the fo
    11·1 answer
  • In ____________, a large address block could be divided into several contiguous groups and each group be assigned to smaller net
    7·1 answer
  • If your presentation uses a background, your text should
    10·2 answers
  • What steps are needed for word to create an index
    6·2 answers
  • In which of the following situations is it probably better to use a fixed-size array over another more flexible option, like Arr
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!