Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago