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]
2 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]2 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
Is it safe to tape down cords such as internet cables to the floor?
zhenek [66]

Yes it is safe to tape down cords such as internet cables to the floor

5 0
3 years ago
Kylee needs to ensure that if a particular client sends her an email while she is on vacation, the email is forwarded to a cowor
STALIN [3.7K]

Answer: Configure a response for external senders.

Explanation:

Since Kylee wants to ensure that when a particular client sends her an email while she is on vacation, then the email will be forwarded to a coworker for immediate handling, then she should configure a response for external senders.

It should be noted that the response will not be configured for internal senders as it isn't from a co-worker but rather meant for a client. Therefore, the correct option is A.

6 0
3 years ago
Does anyone take bca on plato
SVETLANKA909090 [29]
I do. do you need help with it?
7 0
3 years ago
What is an example of a device that commonly use Linux today
slava [35]

Answer:

include iPods, PlayStations, Xbox, TiVo, and WRT54G.

Explanation:

3 0
2 years ago
Read 2 more answers
A transcript must bear a(n)___ to be considered official
harkovskaia [24]
A transcript must have a signature or school stamp. 
7 0
3 years ago
Read 2 more answers
Other questions:
  • What of the following google tools support collaboration
    10·1 answer
  • You can use ___________ to add dynamic features to a webpage such as search box that completes your search text automatically.
    12·1 answer
  • Ideally, how often should you back up the data on your computer? once an hour, once a day, once a month, once a year. Please hur
    5·2 answers
  • Why Stockholder are interested in the way a company operate?
    12·1 answer
  • ____ devices are high-performance storage systems that are connected individually to a network to provide storage for the comput
    12·1 answer
  • Design and implement an application that plays the Hi-Lo guessing game with numbers. The program should pick a random number bet
    13·1 answer
  • Whats the difference between Input and Output? Give and example of an example on a M:B​
    15·1 answer
  • What is the correct format to use when<br> inserting a date in Excel?
    15·1 answer
  • PLEASE HELP! I accidently looked up a link, and now this same link keeps popping up everywhere, how do I stop this!?!? please he
    13·2 answers
  • Data security issues that must be addressed by hipaa implementation teams include:__________
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!