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
r-ruslan [8.4K]
3 years ago
12

Write a class called Person that has two data members - the person's name and age. It should have an init method that takes two

values and uses them to initialize the data members.Write a separate function (not part of the Person class) called std_dev that takes as a parameter a list of Person objects (only one parameter: person_list) and returns the standard deviation of all their ages (the population standard deviation that uses a denominator of N, not the sample standard deviation, which uses a different denominator).
Computers and Technology
1 answer:
umka21 [38]3 years ago
3 0

Answer:

class Person(object):

   def __init__(self, name, age):

       self.name = name

       self.age = age

 

def std_dev(person_list):

   average = 0

   for person in person_list:

       average += person.age

   average /= len(person_list)

   total = 0

   for person in person_list:

       total += (person.age - average) ** 2

   return (total / (len(person_list) )) ** 0.5

Explanation:

The class "Person" is a python program class defined to hold data of a person (name and age). The std_dev function accepts a list of Person class instances as an argument and returns the calculated standard deviation of the population.

You might be interested in
What information is not typically included in an e-mail header?​?
Arada [10]
The answer is the sender's physical location.  The information that is not typically included in an e-mail header is the sender's physical location.  The email header contains only  the sender and receiver e-mail addresses,  <span>Enhanced Simple Mail Transport Protocol (ESMTP) or reference number and the e-mail servers the message traveled through to reach its destination.  </span>
6 0
4 years ago
What software refers to the on authorized and illegal duplication or sale of software
svetlana [45]
The proper term to be used here is piracy, or the act of stealing games, movies and software's. 
7 0
3 years ago
. Database connectivity software is also known as:
astra-53 [7]

Answer: Database middleware

Explanation:

   Database connectivity is the technique by which application programs makes the interaction and transfer of data storage . The connectivity of the database of the software is called database middleware, as it acts as a piece of software that makes connection as a middle-factor between the application program and the collection of data.

Therefore, database connectivity is also called as database middleware.  

5 0
3 years ago
What do you think about net neutrality??
Tomtit [17]
I think net neutrality should be kept! Removing net neutrality is unfair for all those who use the Internet! I think life would change is net neutrality did. Certain websites (a lot!) would slow down and cause a lot of people inconvenience, and I bet we'd have to pay more to use some sites!!!

NET NEUTRALITY SHOULD BE PRESERVED!!!!
6 0
3 years ago
Read 2 more answers
A person who is skilled at performing calculations, has math skills for advanced analysis, and has organizational skills would b
Harman [31]
A mathematician because of all their skills they have they suit the job
3 0
3 years ago
Read 2 more answers
Other questions:
  • It is important that researchers design rigorous study methods to eliminate: a. inferences. b. the need for a CONSORT flow chart
    10·1 answer
  • 7.12 LAB: Contains the character
    12·2 answers
  • The four basic stucture of computer are input processing output and storage true or false
    15·1 answer
  • How to reply to text from unknown number?
    11·1 answer
  • Fill in the blank: _________ is Google’s machine-learning artificial intelligence system that interprets people’s searches to fi
    9·1 answer
  • How does it transform your ways of socializing
    11·1 answer
  • Why do we need to make a plan before actions?
    7·1 answer
  • An analogue sensor has a bandwidth which extends from very low frequencies up to a maximum of 14.5 kHz. Using the Sampling Theor
    9·2 answers
  • How would you want to change the copyright laws?
    11·1 answer
  • What is draft pls help me​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!