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
Who was the father of computer?????​
adell [148]

Answer:

Charles Babbage

Explanation:

4 0
3 years ago
Read 2 more answers
Who developed the idea of a universal network?
polet [3.4K]
Alan Turing fathered the machines we now lovingly call computers, however it was Nicola Tesla that birthed the idea of a world-wide wireless system.
7 0
3 years ago
Need help ASAP <br><br> Thankss + BRAINLIST only for correct answers
AVprozaik [17]
Why visit it?
For entertainment, purely for the user to enjoy the content that has been produced for them.

Why was it made?
Netflix is a subscription based service that has been made to allow users to stream TV shows and other entertainment sources. It was made for leisure.
7 0
2 years ago
At the beginning of Section 5.2, it is stated that multiprogramming and multiprocessing present the same problems, with respect
QveST [7]

Answer:

By definition, <u>multiprocessing</u> refers to the processing of multiple processes at the same time by multiple CPUs.

By definition, <u>multiprogramming</u> keeps programs in main memory at the same time and execute them concurrently utilizing a single CPU doing a context switch.

The first difference is that multiprocessing uses multiple CPUs and multiprogramming to utilize context switch to do concurrency in one CPU. Another difference is that multiprocessing is more expensive but more efficient than multiprogramming due that it allows parallel processing.

6 0
3 years ago
What is the difference between margin and padding property?
VMariaS [17]

Answer:

Margin is applied to the outside of your element hence affecting how far your element is away from other elements.

Padding is applied to the inside of your element hence affecting how far your element's content is away from the border.

Explanation:

Hope it helps!!!

6 0
1 year ago
Other questions:
  • A cloud file system (CFS) allows users or applications to directly manipulate files that reside on the cloud.
    6·1 answer
  • How will you create an email id
    11·1 answer
  • 1. Caches are important to providing a high-performance memory hierarchy to processors. Below is a list of 32-bit memory address
    7·1 answer
  • To display the Color gallery, with the graphic selected, click the Color button in the ____ group on the PICTURE TOOLS FORMAT ta
    14·1 answer
  • While surfing online, Patricia checks her email and reads the latest messages. She then browsers a website and logs in a comment
    8·1 answer
  • It is not important to keep financial records since they can all be found online.
    5·2 answers
  • . List 5 types of exploits from cybercrime and provide brief definition. (2.5 Marks)
    5·1 answer
  • Which programming language represents data in the form of a series of zeros and ones​
    7·1 answer
  • Edhesive 3.4 practice 1
    9·1 answer
  • There are some games that cannot be described by a single--or even two-- genres. Can you think of any that should be invented?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!