import math
from __future__ import division
#initialisation of variables
p=24; #in inch
f=16; #inch
h=3; #inch
#CALCULATIONS
q=(p*f)/(p-f); #calculating image distance
hd=(-h*q)/p; #calculating diameter
#RESULTS
print"Distance of image in inch =",round(q,3);
print"Diameter in inch =",round(hd,3);
import math
from __future__ import division
#initialisation of variables
p=30; #in cm
f=15; #in cm
h=8; #in cm
#CALCULATIONS
q=(p*f)/(p-f); #calculating image distance
hd=(-h*q)/p; #calculating diameter
#RESULTS
print"Distance of image in cm =",round(q,3);
print"Diameter in cm =",round(hd,3);
import math
from __future__ import division
#initialisation of variables
p=100; #in cm
f=40; #in cm
h=6; #in cm
#CALCULATIONS
q=(p*f)/(p-f); #calculating image distance
hd=(-h*q)/p; #calculating diameter
#RESULTS
print"Distance of image in cm =",round(q,3);
print"Diameter in cm =",round(hd,3);
import math
from __future__ import division
#initialisation of variables
p=12; #in ft
f=-2; #in ft
#CALCULATIONS
q=(p*f)/(p-f); #calculating image distance
m=-q/p; #calculating magnification
#RESULTS
print"Distance of image in ft =",round(q,3);
print"Magnification =",round(m,3);
import math
from __future__ import division
#initialisation of variables
hd=5; #in mm
h=2; #in mm
f=6; #in cm
#CALCULATIONS
m=hd/h; #calculating magnification
p=((m-1)/m)*f; #lens formula
q=-m*p; #lens formula
#RESULTS
print"Distance in cm =",round(p,3);
print"Image distance in cm =",round(q,3);
import math
from __future__ import division
#initialisation of variables
p=1.5; #in inch
m=3; #magnification
#CALCULATIONS
q=-m*p; #calculating image distance
f=(p*q)/(p+q); #calculating focal length
#RESULTS
print"Distance of image in inch =",round(q,3);
print"Focal Length in inch =",round(f,3);
import math
from __future__ import division
#initialisation of variables
p=1.5; #in inch
f=0.15; #in metre
#CALCULATIONS
w=(p*f)/(p-f); #calculating focal length
w1=w*10**3;
#RESULTS
print"Length in mm =",round(w1,3);
import math
from __future__ import division
#initialisation of variables
hd=-36; #in inch
h=2; #in inch
q=-15; #in ft
#CALCULATIONS
m=hd/h; #calculating magnification
p=-q/m; #in ft
f=(p*q)/(p+q); #calculating focal length
#RESULTS
print"Focal Length in ft =",round(f,3);
import math
from __future__ import division
#initialisation of variables
f1=10; #in cm
f2=-20; #in cm
#CALCULATIONS
f=(f1*f2)/(f1+f2); #calculating focal length
#RESULTS
print"Focal length of the combination in cm =",round(f,3);