Python can be used to implement central of tendencies such as mean, median and mode using the statistic module
The program in Python, where comments are used to explain each line is as follows:
#This imports the statistics module
import statistics
#This defines the function that calculates the mode
def calcMode(myList):
#This prints the mode
print(statistics.multimode(myList))
#This defines the function that calculates the median
def calcMedian(myList):
#This prints the median
print(statistics.median(myList))
#The main method begins here
#This initializes the list
myList = []
#The following iteration gets input for the list
for i in range(10):
myList.append(int(input()))
#This calls the calcMode method
calcMode(myList)
#This calls the calcMedian method
calcMedian(myList)
Read more about similar programs at:
brainly.com/question/25026386
Answer:
(11n-5) / 12 is correct answer.
Explanation:
The Probability that key will match to nth term = 1/2
The Probability that key will match to n-1th term = 1/3
As all other probabilities are equal
The Total Probability that key matches to any of 1 to n-2 index = 1 - 1/2 - 1/3 = 1/6
The Probability that key matches to any of 1 to n-2 index = (1/6) / n-2 = (1/6)* (n-2))
Let P(i) = Probability that key matches to ith index.
The Average time complexity = 22 i=1 P(i) * i
The Average time complexity = 1/(6(n-2) * ( sum of 1 to n-2 ) + (n-1) / 3 + n/2
The Average time complexity = 1/(6(n-2) * ( n-2)*(n-1) / 2 + ( n-1) / 3 + n/2
The Average time complexity = 1/6 * (n-1)/2 + (n-1)/3 + n/2
The Average time complexity = (n-1)/12 + (n-1)/3 + n/2
The Average time complexity = (n-1 + 4 * n - 4 * 1 +6 * n)/12
The Average time complexity = 11n-5 / 12
so (11n-5) / 12 is correct answer.
Answer:
Crosstalk, Jitter, Impulse noise.
Explanation:
Crosstalk is a network error that occurs when one pair of cable causes interference on another pair of cables thereby preventing efficient data transmission.
Jitter may also impair the accuracy of the data being transmitted across network because minute variations in amplitude, phase, and frequency always occur. The generation of a perfect carrier signal in an analog circuit is almost impossible. The signal may be affected by continuous and rapid network gains or phase changes.
Impulse noise (also referred to as spikes) is the primary source of errors in data communications. Impulse noise can be caused by positioning a communications cable near a source of intermittent but strong electromagnetic pulses, such as an elevator motor.
Counter measures
Shielding (protecting wires by covering them with an insulating coating) is one of the best ways to prevent impulse noise, cross-talk.
Amplifiers can be used to increase signal strength since the connection would run across 4 floors.
You would want to check for any programs running in the background, as well as run a virus scan.
Answer:
1. You want to use parameters
2. You don't want your program to run multiple times
3. You want to call that snippet of code throughout your program
hope this helped :D