Answer:
- def median(l):
- if(len(l) == 0):
- return 0
- else:
- l.sort()
- if(len(l)%2 == 0):
- index = int(len(l)/2)
- mid = (l[index-1] + l[index]) / 2
- else:
- mid = l[len(l)//2]
- return mid
-
- def mode(l):
- if(len(l)==0):
- return 0
-
- mode = max(set(l), key=l.count)
- return mode
-
- def mean(l):
- if(len(l)==0):
- return 0
- sum = 0
- for x in l:
- sum += x
- mean = sum / len(l)
- return mean
-
- lst = [5, 7, 10, 11, 12, 12, 13, 15, 25, 30, 45, 61]
- print(mean(lst))
- print(median(lst))
- print(mode(lst))
Explanation:
Firstly, we create a median function (Line 1). This function will check if the the length of list is zero and also if it is an even number. If the length is zero (empty list), it return zero (Line 2-3). If it is an even number, it will calculate the median by summing up two middle index values and divide them by two (Line 6-8). Or if the length is an odd, it will simply take the middle index value and return it as output (Line 9-10).
In mode function, after checking the length of list, we use the max function to estimate the maximum count of the item in list (Line 17) and use it as mode.
In mean function, after checking the length of list, we create a sum variable and then use a loop to add the item of list to sum (Line 23-25). After the loop, divide sum by the length of list to get the mean (Line 26).
In the main program, we test the three functions using a sample list and we shall get
20.5
12.5
12
Answer:
Check the explanation
Explanation:
The transferred energy calculations can be done using the equation:
This is when:
• power is calculated in watts (W)
• energy is calculated in joules (J)
• time is calculated in seconds (s)
it can also be calculated by utilizing the same equation but with different units:
• when energy is measured in kilowatt-hours (kWh)
• when power is measured in kilowatts (kW)
• and when time is measured in hours (h)
kindly check the comprehensive step by step calculation to the question in the attached images below
Answer:
The claim is false and violate the zeroth law of thermodynamics.
Explanation:
Zeroth law of thermodynamics refers to thermal equilibrium among elements. It states that elements which different temperatures will reach the same temperature at the endgame if they are close enough to interact each other. This temperaure is called <em>equilibrium temperature and it is always a intermediate value between the element with highest temperature and the element with the lowest one. So there is no way </em> a cup of cold coffee on a table can warm up to 80°C picking up energy from the surrounding air at 25°C because the cup can only reach a temperature closer to the surrounding air temperature which will be the equilimbrium temperature for that case.
Answer:
105.70 mm
Explanation:
Poisson’s ratio, v is the ratio of lateral strain to axial strain.
E=2G(1+v) where E is Young’s modulus, v is poisson’s ratio and G is shear modulus
Since G is given as 25.4GPa, E is 65.5GPa, we substitute into our equation to obtain poisson’s ratio

Original length 

Where
is final diameter,
is original diameter,
is final length and
is original length.


Therefore, the original length is 105.70 mm