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]
2 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]2 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
An organization requires secure configuration baselines for all platforms and technologies that are used. If any system cannot c
Romashka [77]

Answer:

C. Process a risk acceptance for 2633 and remediate 3124.

Explanation:

There are various business risks. Some are inherited risks while other are risks are associated with nature of business. It is dependent on business owners that they want to accept risk or mitigate the risk. Risk acceptance is based on the strategy of the management. In the given scenario Accounting Prod Production has low risk 2633 which is accepted while 3124 is high risk which is remediated.

8 0
2 years ago
What types of issues can you most likely resolve by knowing how to access and use the control Panel?
andrezito [222]
Network issues; screen resolution and volume issues
8 0
3 years ago
What do you mean by computer ethics?​
STALIN [3.7K]

Answer:

Computer ethics is a field of applied ethics that addresses ethical issues in the use, design and management of information technology and in the formulation of ethical policies for its regulation in society.

3 0
2 years ago
Write a copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *thi
Olin [163]

The following cose will be used to copy assignment operator for CarCounter

<u>Explanation:</u>

Complete Program:

#include <iostream>

using namespace std;

class CarCounter

{

public:

CarCounter();

CarCounter& operator=(const CarCounter& objToCopy);

void SetCarCount(const int setVal)

{

 carCount = setVal;

}

int GetCarCount() const

{

 return carCount;

}

private:

int carCount;

};

CarCounter::CarCounter()

{

carCount = 0;

return;

}

// FIXME write copy assignment operator

/* Your solution goes here */

CarCounter& CarCounter::operator=(const CarCounter& objToCopy)

{

if(this != &objToCopy)

 carCount = objToCopy.carCount;

return *this;

}

int main()

{

CarCounter frontParkingLot;

CarCounter backParkingLot;

frontParkingLot.SetCarCount(12);

backParkingLot = frontParkingLot;

cout << "Cars counted: " << backParkingLot.GetCarCount();

cout << endl << endl;

system("pause");

return 0;

}

5 0
3 years ago
Write a Python function that will accept as input three string values from a user. The method will return to the user a concaten
Aleks04 [339]

Answer:

Following are the program in python language

def cat_rev(x,y,z): # function definition  

   x=x[::-1]# reverse the first string  

   y=y[::-1]# reverse the second string  

   z=z[::-1]# reverse the third string  

   z=x+y+z;  #concat the string

   return(z)#return the string

   #main method

s=input("Enter the first string:") #read the first string

r=input("Enter the second string:")#Read the second string  

t=input("Enter the third string:")#Read the third string by user

rev1= cat_rev(s,r ,t ) #function calling

print(rev1)# display reverse string

Output:

Enter the first string:san

Enter the second string:ran

Enter the third string:tan

nasnarnat

Explanation:

Following are the description of program

  • In the main function we read the three value by the user in the "s", "r" and "t" variable respectively.
  • After that call the function cat_rev() by pass the variable s,r and t variable in that function .
  • Control moves to the function definition of the cat_rev() function .In this function we reverse the string one by one and concat the string by using + operator .
  • Finally in the main function we print the reverse of the concat string   .

5 0
2 years ago
Other questions:
  • Please answer fast screenshot included - thanks in advance
    11·1 answer
  • Trina Hauger works for Johnson Electric as a corporate lawyer, and part of her duties are to ensure the ethical and legal use of
    13·1 answer
  • Write a program to calculate and return total surface area of a box using FUNCTION _END FUNCTION.​
    15·1 answer
  • What is the radix transformation method?
    5·1 answer
  • Signs of mastery include?
    10·1 answer
  • The rules of right-of-way<br> Pedestrians, bicyclists, and skateboarders<br> when they use the road.
    12·1 answer
  • Activity
    7·1 answer
  • Whats the formatting of a letter to the editor?​
    12·1 answer
  • _____ provide a label or explanation of an image or object.
    5·1 answer
  • What can be done to solve unemployment problem?​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!