Answer:
import numpy as np
def sample_median(n, P):
return np.median( np.random.choice ( np.arange (1, len(P) + 1 ), n, p = P ) )
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, [0.3,0.7])
print(sample_median(5, [0.3,0.7])
Explanation:
- Bring in the numpy library to use the median function provided by the numpy library.
- Define the sample_median function that takes in 2 parameters and returns the median with the help of built-in random, choice and arrange functions.
- Call the sample_median function by providing some values to test and then display the results.
Output:
4.5
4.0
2.0
1.0
Answer:
A LAN
Explanation:
A LAN, or a Local Area Network, is a network of devices typically within 10 meters of range regardless of what it is built around.
Answer:
invention such as new tool devices progress and resistance benefits to society inventions selfie lies and provide new way to build move communicate heal learn and play
Polymorphism is malware's ability to change the way it appears on different computers. This makes it very difficult for antivirus software to identify the malware.
Answer:
Viruses can enter your computer in any number of ways, such as via an email attachment, during file downloads from the Internet or even upon a visit to a contaminated Web site.Jun 2, 2010
Explanation:
Viruses spread when the software or documents they get attached to are transferred from one computer to another using a network, a disk, file sharing methods, or through infected e-mail attachments. Some viruses use different stealth strategies to avoid their detection from anti-virus software.