# given data
V2rms= 40.0## V
R_L= 20.0## Ω
V2peak= V2rms/0.707## V
Vout_peak= V2peak## V
# The dc voltage across the load resistor
Vdc=0.318*Vout_peak## V
#The peak inverse voltage across the diode
PIV= V2peak## V
Idc= Vdc/R_L## A
# The dc current through the diode
I_diode= Idc## A
print "The dc voltage across the load resistor = %.2f volts"%Vdc
print "The peak inverse voltage across the diode = %.2f volts"%PIV
print "The dc current through the diode = %.2f A"%I_diode
# given data
Vrms= 40.0## V
R_L= 20.0## Ω
V2peak= Vrms/0.707## V
Vout_peak= V2peak/2## V
# The dc load voltage
Vdc=0.636*Vout_peak## V
# The peak inverse voltage across each diode
PIV= V2peak## V
Idc= Vdc/R_L## A
# The dc current through each diode
I_diode= Idc/2## A
print "The dc load voltage = %.2f volts"%Vdc
print "The peak inverse voltage across each diode = %.2f volts"%PIV
print "The dc current through each diode = %.2f A"%I_diode
# given data
Vrms= 40.0## V
R_L= 20.0## Ω
V2peak= Vrms/0.707## V
Vout_peak= V2peak## V
# The value of Vdc
Vdc=0.636*Vout_peak## V
# The value of PIV
PIV= V2peak## V
Idc= Vdc/R_L## A
#The value of I_diode
I_diode= Idc/2## A
print "The dc load voltage = %.2f volts"%Vdc
print "The peak inverse voltage across each diode = %.2f volts"%PIV
print "The dc current through each diode = %.2f A"%I_diode
# given data
Vdc= 56.6## V
R_L= 100.0## Ω
f=120.0## Hz
C= 1000.0## µF
C= C*10**-6## F
V2peak= Vdc## V
Idc= Vdc/R_L## A
# The peak-to-peak ripple
Vrip= Idc/(f*C)## V
# The dc load voltage
Vdc= V2peak-Vrip/2## V
print "The peak-to-peak ripple = %.2f volts"%Vrip
print "The dc load voltage = %.2f volts"%Vdc
# given data
V2rms= 12.6## V
V_Z= 6.8## V
V2peak= V2rms/0.707## V
Vin= V2peak## V
Vout= V_Z## V
R_L= 1.2## kΩ
R_L= R_L*10**3##in Ω
Rs= 1## kΩ
Rs= Rs*10**3## Ω
Is= (Vin-Vout)/Rs## A
I_L= Vout/R_L## A
# The zener current
Iz= Is-I_L## A
Iz= Iz*10**3## mA
print "The zener current = %.2f mA"%Iz
# Note: The calculation = %.2f the book is not accurate.
# given data
C= 100.0##in µF
C= C*10**-6## F
Rz= 5.0##in Ω
Rs= 1.0*10**3##in Ω
Idc= 11.0*10**-3##in A
f=120.0##in Hz
Vin_rip= Idc/(f*C)## V
# The ripple across the load resistance
Vout_rip= Rz*Vin_rip/(Rs+Rz)##in A
Vout_rip= Vout_rip*10**3## mV
print "The ripple across the load resistance = %.2f mV"%Vout_rip