Computers and Technology

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 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, import the statistics library and use its built-in mean, median and mode functions. 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: std_dev. py

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 08:00, dustysorrells74
Someone with this coz i don’t really know what i can choose, just pick whatever u want. homework - you need to choose a website that you like or use frequently. you must visit the website and discuss 6 different features/parts/aspects of the website that you think makes it good. (100 words)
Answers: 2
image
Computers and Technology, 22.06.2019 11:00, ed72018373
Which law requires employers to provide safe working environments for their employees? a. civil rights act b. fair labor standards act c. occupational safety and health act d. wagner act
Answers: 1
image
Computers and Technology, 22.06.2019 21:00, mazolethrin9632
Which of these is most responsible for differences between the twentieth century to the twenty-first century?
Answers: 2
image
Computers and Technology, 23.06.2019 16:00, ginaaa20
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
Do you know the correct answer?
Write a class called person that has two data members - the person's name and age. it should have an...

Questions in other subjects: