All problems
Effective Number of Bits
Problem
Invert the ideal quantization SNR rule to find the effective number of bits:
n = (snr_db - 1.76) / 6.02
Hint
Subtract the 1.76 dB constant before dividing by 6.02.
Test cases
case 1
in: [49.92]
expected: 8.000000000000002
case 2
in: [98.08]
expected: 16
case 3
in: [7.78]
expected: 1.0000000000000002
case 4
in: [25.86]
expected: 4.003322259136213
Starter codePython
def effective_bits(snr_db):
# Your code here
pass4 test cases · run your code against them in the editor