from __future__ import division
Ipq=4/(3+4)
Vpq=Ipq*3
Vpq_per_cm=Vpq/100
Dpx=1.0186/Vpq_per_cm
print "Distance PX = %.2f cm"%(Dpx)
V_per_cm=1.0186/60
#When S is replaced by a dry cell we get PK=85 cm for null deflection
Dpk=85
V_dry_cell=Dpk*V_per_cm
print "Voltage of dry cell=%.2f V"%(V_dry_cell)
Vpq=(1.02*5/2500)*1000
Lpq=1.2*100/Vpq
print "Length of PQ=%.2f m"%(Lpq)
l2=(10/3)*(1.5/1.5)*(9/15)**2
print "Length of wire=%.2f m"%(l2)
a1=0.0004
a2=0.0003
R2=1
R1=1.5*R2
T=100
Rp=R1*(1+a1*T)
Rq=R2*(1+a2*T)
R=Rp/Rq
print "Ratio of resistances=%.2f"%(R)
emf_std_cell=1.0183
emf_cell=70/50*emf_std_cell
print "e.m.f. of the cell=%.2f V"%(emf_cell)
V_read=1.35
V_cal=1.32379
error_voltmeter_percent=((V_read-V_cal)/V_cal)*100
print "Perentage error of the voltmeter = %.2f"%(error_voltmeter_percent)