v=12; f=60; i=0.05; p=0.1; disp("Part a"); v1=24; z=v/i; rl=p/i^2; x_l=sqrt(z^2-rl^2); z1=v1/i; r=sqrt(z1^2-x_l^2)-rl; pr=i^2*r; disp("the series resistor has a value (in Ω) of"); disp(r); disp("power dissipation (in W) is");disp(pr); disp("Part b"); x_c=sqrt(z1^2-rl^2)+x_l; c=1/(2*%pi*f*x_c); disp("the size of series cpacitor (in μF) is");disp(c*10^6); disp("Part c"); v2=120; z2=v2/i; x_c2=sqrt(z2^2-rl^2)+x_l; c2=1/(2*%pi*f*x_c2); disp("the size of the series capacitor (in μF) is"); disp(c2*10^6); vc=i*x_c2; disp("voltage (in V) across the capacitor is"); disp(vc); disp("Part d"); r2=sqrt(z2^2-x_l^2)-rl; disp("the size of the series resistor (in Ω) is"); disp(r2); p2=i^2*r2; disp("power dissipation (in W) is"); disp(p2);