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:

  1. propagates through the atmosphere in rainy weather over a distance d, in kilometres (km)
  2. 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:

  1. rain leads to an atmospheric loss of 1.5 decibel per kilometre (dB/km)
  2. wood leads to a further loss of 90 decibel per metre (dB/m)
  3. 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!