![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 08.04.2020 18:32 anaber524
Write a function sample_median(n, P) that generates n random values using distribution P and returns the median of the collected sample. Hint: Use function random. choice() to sample data from P and median() to find the median of the samples * Sample run * print(sample_median(10,[0.1 0.2 0.1 0.3 0.1 0.2])) print(sample_median(10,[0.1 0.2 0.1 0.3 0.1 0.2])) print(sample_median(5,P=[0.3,0.7]) print(sample_median(5,P=[0.3,0.7]) * Expected Output * 4.5 4.0 2.0 1.0
![ansver](/tpl/images/cats/User.png)
Answers: 1
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 17:30
Which tab should you open to find the option for adding a header?
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 21:00
Describir textbook icon_person mira los dibujos y describe lo que está pasando. usa los verbos de la lista.
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 15:00
Jake really works well with numbers and is skilled with computers but doesn't work well with others. which of the jobs discussed in this unit might be best for jake? why?
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 07:00
Why would a business likely use a java applet - to back up their data files for the business - to create a program that a customer can launch in their web browser - to create music on a powerpoint presentation - to organize files on their company directory
Answers: 3
You know the right answer?
Write a function sample_median(n, P) that generates n random values using distribution P and returns...
Questions
![question](/tpl/images/cats/es.png)
Spanish, 25.12.2019 13:31
![question](/tpl/images/cats/istoriya.png)
History, 25.12.2019 13:31
![question](/tpl/images/cats/en.png)
English, 25.12.2019 13:31
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/fizika.png)
Physics, 25.12.2019 13:31
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/fizika.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 25.12.2019 13:31
![question](/tpl/images/cats/mat.png)
Mathematics, 25.12.2019 13:31
![question](/tpl/images/cats/mat.png)
Mathematics, 25.12.2019 13:31
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/obshestvoznanie.png)
![question](/tpl/images/cats/fizika.png)
Physics, 25.12.2019 13:31
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/en.png)
English, 25.12.2019 13:31
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 25.12.2019 13:31