#Given
#(a)
V=10.0
x1=10 #Polarity combination of voltages
y1=10 #V
#(b)
x2=-10 #V, 2nd combination
y2=10 #V
#(c)
x3=10 #V
y3=-10 #V
#(d)
x4=-10 #V
y4=-10 #V
#Calculation
Vo1=x1*y1/V
Vo2=x2*y2/V
Vo3=x3*y3/V
Vo4=x4*y4/V
#Result
print"The values of Vo are",Vo1,"V ,",Vo2,"V ,",Vo3,"V ,",Vo4,"V"
#Given
Ei1=10 #V
Ei2=-10 #V
#Calculation
Vo1=Ei1**2/Ei1
Vo2=Ei2**2/Ei1
#Reult
print"(a)The value of Vo is",Vo1,"V"
print"(b)The value of Vo is",Vo2,"V"
#Given
Ei1=10 #V
f1=1 #KHz
Ei2=2 #V
f1=2.5 #KHz
#Calculation
dcvalue=Ei1**2/20.0
pac=Ei1**2/20.0
#(b)
dcvalue_=Ei2**2/20.0
pac_=Ei2**2/20.0
#Result
print"(a)The DC and AC output voltage are",dcvalue,"V,",pac,"V at 2 KHz"
print"(b)The DC and AC output voltage are",dcvalue_,"V,",pac_,"V at 5 KHz"
#Given
Exp=5 #V
Eyp=5 #V
Vodc=1.25 #DC component of Vo
#calculation
import math
theta=math.acos(20*Vodc/(Exp*Eyp))
#Result
print"The angle is",theta,"degree"
#Given
Vo=0 #AVerage value of DC component
#calculation
import math
theta=math.acos(Vo)
#Result
print"The angle is",round(theta*180/3.14,0),"degree"
#Given
theta1=30 #degree
theta2=45 #degree
theta3=60 #degree
theta4=0 #Degree from example 12.5
theta5=90 #Degree from example 12.6
#Calculation
import math
Vodc1=math.cos(theta1*3.14/180.0)
Vodc2=math.cos(theta2*3.14/180.0)
Vodc3=math.cos(theta3*3.14/180.0)
Vodc4=math.cos(theta4*3.14/180.0)
Vodc5=math.cos(theta5*3.14/180.0)
#Result
print"The Output Dc voltages are",round(Vodc1,3),"V ,",round(Vodc2,3),"V ,",round(Vodc3,3),"V ,",round(Vodc4,3),"V ,",round(Vodc5,3),"V ,"
#GIven
theta1=90 #degree
theta2=120 #degree
theta3=135 #degree
theta4=150 #degree
theta5=180 #degree
#Calculation
import math
Vodc1=math.cos(theta1*3.14/180.0)
Vodc2=math.cos(theta2)
Vodc3=math.cos(theta3)
Vodc4=math.cos(theta4)
Vodc5=math.cos(theta5)
#Result
print"The Voltages are",round(Vodc1,3),"V ,",round(Vodc2,3),"V ",round(Vodc3,3),"V ",round(Vodc4,3),"V ",round(Vodc5,3),"V "
#Given
Ecp=5 #V, Voltage
fc=10000 #Hz frequency
Em=5 #V peak voltage
fm=1000 #Hz frequency
#Calculation
Vc=Em*Ecp/(10.0) #The carrier term peak voltage
Vp=Vc #product term Peak voltage
Vs=Em*Ecp/(20.0) #The side term peak voltagec
#Result
print"The carrier term peak voltage is",Vc,"V"
print"The product term peak voltage is",Vp,"V"
print"The side term peak voltage is",Vs,"V"