Answered step by step
Verified Expert Solution
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
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 blockStep 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