Complete the code to calculate the noise power given signal power and SNR in dB.
noise_power = signal_power / (10 ** ([1] / 10))
Noise power is calculated by dividing the signal power by 10 raised to the power of SNR in dB divided by 10.
Complete the code to calculate the SNR in dB from signal and noise power.
snr_db = 10 * math.log10(signal_power / [1])
SNR in dB is 10 times the log base 10 of the ratio of signal power to noise power.
Fix the error in the code to compute noise power from SNR in dB and signal power.
noise_power = signal_power / (10 ** ([1]))
The division by 10 must be inside the exponentiation parentheses to correctly convert dB to linear scale.
Fill both blanks to create a dictionary mapping signal names to their SNR in dB, filtering only those with SNR above 10 dB.
snr_dict = {name: 10 * math.log10(signal / noise) for name, (signal, noise) in data.items() if 10 * math.log10(signal / noise) [1] [2]The dictionary comprehension filters entries where the SNR in dB is greater than 10.
Fill all three blanks to create a list of SNR values in dB for signals with noise power less than 0.01.
snr_values = [10 * math.log10([1] / [2]) for [3], ([1], [2]) in signals.items() if [2] < 0.01]
The list comprehension calculates SNR in dB for each signal where noise power is less than 0.01, iterating over signal names and their power values.
