Question
This is a Python code ,when i run give me a error, when i introduce the wood in meters I poste with the problem also,
This is a Python code ,when i run give me a error, when i introduce the wood in meters I poste with the problem also, if anyone can help mi fix it thanks
Let us suppose a 5 GHz radio wave that:
- propagates through the atmosphere in rainy weather over a distance d, in kilometres (km)
- and then through one layer of wood of thickness t, in metres (m).
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.01921. 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).
def decibel_test(distance, timber_loss): unique_number = 1.01921 rain_loss = 1.5 atmospheric_loss = rain_loss * distance decibel_loss = tiimber_loss + atmospheric_loss total_loss = decibel_loss * unique_number return total_loss print('distance in km') distance=float(input()) print('wood in metres') timber_loss = 90 * float(input()) DB_loss=decibel_test(distance,timber_loss) print('the total decibel loss is', DB_loss)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started