Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello I have no clue why my code isnt working if you could take a look and help it would be greatly appreicated im using

Hello I have no clue why my code isnt working if you could take a look and help it would be greatly appreicated im using jupyter notebook nvm I got it please dont answer this

image text in transcribedimage text in transcribed

Q1. A decibel value of x is defined as X(dB) = 10log10(x) VIA UECIDe value A is ueneu as AUD) TUI0X100) 1. List the equation to get x if X(dB) is known. 2. If X(dB) and Y(dB) are the decibel values of x and y, what are the decibel value of 10x, 2x, 0.5x, 0.1x, xy and x/y? In [21]: #Continue to finish the following codes from numpy import log10 X = 2 X = 10 * log10 (x) #question one print(str(x) + 'l's decible value is :'+ str(round(X, 1)) + 'd') X=pow(10,X/10) print("the x value of" + str(round(X, 3))) print('is' + str(x)) #question two import math def getdB(x): return 10 * math.log(x,10) def getx(dB): return pow(10, (dB/10)) X = 20 Y = 10 X = getx(X) y = getx(Y) print('The dB value for 18x is ' + str(round(getdB(10*x), 3))) print('The dB value for 2x is ' + str(getdB(2*x))) print('The dB value for 0.5x is + str(getdB(0.5*x))) print('The dB value for 0.1x is ' + str(getdB(0.1*x))) print('The dB value for xy is ' + str(round(getdB(x * y),3)) print('The dB value for x/y is + str(round(getdB(x / y),3))) File "C:\Users\tyler\AppData\Local\Temp/ipykernel_21792/493385618.py", line 14 return 10 * math.log(x,10) IndentationError: expected an indented block

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

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

Why might stock repurchases be preferred to dividends?

Answered: 1 week ago