![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 15.02.2021 20:10 Officaljazz18
Write a class called Person that has two private 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. It should have a get_age method.
Write a separate function (not part of the Person class) called basic_stats that takes as a parameter a list of Person objects and returns a tuple containing the mean, median, and mode of all the ages. To do this, use the mean, median and mode functions in the statistics module. Your basic_stats function should return those three values as a tuple, in the order given above.
For example, it could be used as follows:
p1 = Person("Kyoungmin", 73)
p2 = Person("Mercedes", 24)
p3 = Person("Avanika", 48)
p4 = Person("Marta", 24)
person_list = [p1, p2, p3, p4]
print(basic_stats(person_list)) # should print a tuple of three values
The files must be named: basic_stats. py
![ansver](/tpl/images/cats/User.png)
Answers: 1
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 04:30, nickddj12
Kyle, a receptionist for a building supply company, recently won an award for saving his company money on their phone system. after being presented with kyle's research, the company changed the way in which it made long-distance phone calls and cut their expenses in this area by 75 percent. the new system the kyle's company most likely adopted was wired communications switching stations voip hdtv
Answers: 3
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 02:00, kelseybell5522
For a typical middle-income family, what is the estimated cost of raising a child to the age of 18? $145,500 $245,340 $304,340 $455,500
Answers: 1
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 06:50, emmv565628
What are the things you are considering before uploading photos on social media?
Answers: 1
You know the right answer?
Write a class called Person that has two private data members - the person's name and age. It should...
Questions in other subjects:
![Konu](/tpl/images/cats/en.png)
![Konu](/tpl/images/cats/health.png)
![Konu](/tpl/images/cats/biologiya.png)
![Konu](/tpl/images/cats/fizika.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 11.05.2021 23:40
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 11.05.2021 23:40
![Konu](/tpl/images/cats/ekonomika.png)
Business, 11.05.2021 23:40
![Konu](/tpl/images/cats/mat.png)
Mathematics, 11.05.2021 23:40