l=30*10^(-3); c=0.005*10^(-6); r=1000; v=2; f=10*10^3; disp("Part a"); x_l=2*%pi*f*l; x_c=1/(2*%pi*f*c); z=sqrt(r^2+(x_l-x_c)^2); disp("the circuit impedance (in Ω)"); disp(z); disp("Part b"); i=v/z; disp("the circuit current (in mA) is"); disp(i*10^3); disp("Part c"); vr=i*r; disp("voltage (in V) across resistor is"); disp(vr); vl=i*x_l; disp("voltage (in V) across inductor is"); disp(vl); vc=i*x_c; disp("voltage (in V) across capacitor is"); disp(vc); disp("Part d"); deg=atan((x_l-x_c)/r); disp("the phase angle (in deg) between current and applied voltage is"); disp(deg);