Question: The problem The problem is to write a function to calculate the total power loss, measured in dB (decibel), under those circumstances given that: rain
The problem
The problem is to write a function to calculate the total power loss, measured in dB (decibel), under those circumstances given that:
- rain leads to an atmospheric loss of 1.5 decibel per kilometre (dB/km)
- wood leads to a further loss of 90 decibel per metre (dB/m)
- to account for other unknown noise and impairments that might be present, the combined loss (obtained by adding the loss from 1 and 2) is multiplied by your individual number 1.0XYZ. This gives you the total loss.
You can test your approach with typical values of d = 30 km and t = 0.1 m (which should result in a combined loss of 54 dB, which must then be multiplied by your individual number in order to find the total loss).
iii.Write one Python function definition as explained below. Save your function in a file called Q4_OUCU.py, where OUCU is your OUCU number. When you have completed your work on this part:
- submit the .py file with your function
- paste the function definition from your .py file as text (with indentation preserved) into your solution document.
Instructions for writing the function:
- Provide a single Python function that implements the algorithm you wrote for Part (c) (ii). Your function must be a translation of your algorithm from Part (c) (ii), otherwise no marks will be awarded.
- The function should have two arguments: one for the distance d and one for the thickness t of the layer of wood.
- The function should have one return value for the total power loss.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
