from math import pi, tan
#Given data :
Za=complex(3,3);#in ohm
Zm=complex(6,3);#in ohm
#Calculations
#Phase difference 90 degree : so angle between Im and V is 90-45 degree
theta=90-45;#in degree
f=50;#in Hz
#Formula : tand(theta)=(Xc-Xl)/R
Xl=3;#in ohm and Xc=1/(2*%pi*C)
R=6;#in ohm
C=1./(2*pi*f*(tan(theta*pi/180)*R+Xl));
#Result
print "Capacitance(in micro Farad) :",(C*10**6);