p=15; rl=200; rb=80; l=0.9; v=120; f=60; disp("Part a"); r=rb+rl; x_l=2*%pi*f*l; z=sqrt(x_l^2+r^2); i=v/z; disp("current drawn (in A) by the lamp is"); disp(i); disp("Part b"); s=v*i; disp("apparent power (in VA) is"); disp(s); disp("Part c"); pl=i^2*rl; disp("power (in W) in the fluorescent lamp is"); disp(pl); disp("Part d"); pb=i^2*rb; disp("power (in W) in the ballast is");disp(pb); disp("Part e"); pf=p/s; disp("overall power factor is"); disp(pf); disp("Part f"); deg=acos(pf); q=v*i*sin(deg); disp("the reactive power (in VAr) is"); disp(q); disp("Part g"); x_c=v^2/q; c=1/(2*%pi*f*x_c); disp("the size of the capacitor (in μF) is"); disp(c*10^6); disp("Part h"); p1=pl+pb; i1=p1/v; disp("current drawn (in A) after power factor correction is"); disp(i1);