from __future__ import division
from math import log10
# decibles
#given data :
i1=4 #assume
i2=4*i1 #
dl=10*log10(i2/i1) #db
print "Decibles by which intensity level will decrease = %0.2f db " %dl
import sympy
# ratio of amlitudes
#given data :
l1=10 #db
l2=40 #db
dl=l2-l1 #db
x=(10**(dl/10)) #
x1=sympy.sqrt(x) #
print "Ratio of amplitudes =", x1
# frequency
#given data :
x=264 #key note
g=x*(3.0/2) #
print "Frequency of note G = %0.f " %g
cd1=x*2 #
print "Frequency of note C = %0.f "%cd1