#given
M=110
x=7.0
#calculation
import math
a=math.log10(110)/(math.log10(2))
n=math.log(M)
b=2**a
u=(a/x)*100
y=math.log10(b)
u1=(y/3.0)*100
#result
print"the number of bits required = ",round(a,2) #number of bits
print"The efficiency is ",round(u1,0),"percent"
#given
m=10**7
Pe=10**-6 #error probability
#calculation
a=m*Pe #average number of errors
#result
print"expected number of errors =",a
#given
Tb=1/9600.0 #bit frequency
Pt=0.8 #transmit power
#calculation
Eb=Pt*Tb #energy per bit
#result
print"Energy per bit = ",round(Eb,7),"J"
#given
bw=3*10**3 #bandwidth
x=1023 #signal-to-noise ratio
#calculation
import math
C=bw*math.log(1+x)/math.log(2) #capacity of telephone channel
#result
print"the capacity of a telephone channel =",C,"bit per second"
#given
Tb=1/(8.0*10**3) #bit frequency
BWmin=1/(2.0*Tb) #minimum bandwidth
#result
print"minimum bandwidth = ",BWmin,"Hz"