disp("Part a"); r=100; p=2; i=sqrt(p/r); disp("the maximum current (in mA) that the resistor can handle is"); disp(i*10^3); disp("Part b"); p1=50*10^(-3); v=40; r1=(v^2)/p1; disp("the resistance (in kΩ) is"); disp(r1*10^(-3));