In [7]:

```
#Given
v=-75.0
u=0
#Calculation
f=v
P=100/f
#Result
print"Focal length is", f,"cm"
print"Power of the lens is",round(P,2),"D"
```

In [14]:

```
#Given
u=-25.0 #cm
v=-150.0 #cm
#Calculation
f=1/((1/v)-1/u)
P=100/f
#Result
print"Focal length of the lens is", f,"cm"
print"Power of the lens is",round(P,2),"D"
```

In [17]:

```
#Given
u=-25.0 #cm
v=-50.0 #cm
#Calculation
f=1/((1/v)-1/u)
#Result
print"Focal length is", f,"cm"
```

In [22]:

```
#Given
v=-80.0 #cm
#Calculation
f=v
P=100/f
#Result
print"(a) Power of the lens is", P,"D"
print"(b) No the corrective lens is concave and it reduces the size of the image. Because it bring the object at the far point of the eye"
print"(c) The myopic person may have a normal near point. He must keep the book at a distance greater than 25 cm."
```

In [29]:

```
#Given
v=-75.0 #cm
u=-25.0 #cm
#Calculation
f=1/((1/v)-1/u)
P=100/f
#Result
print"(a) Power of the lens is", round(P,2),"D"
print"(b) The corrective lens produce a virtual imageof an object at 25 cm. The angular size of this image is the same as the object"
print"(c) A hypermetropic eye may have normal far point.Hence the person prefers not to use the spectacles for distant object"
```

In [43]:

```
#Given
P=-0.8 #d
v1=-15.0 #cm
v2=-100.0 #cm
#Calculation
f=100/P
u1=1/((1/v1)-1/f)
u2=1/((1/v2)-(1/f))
#Result
print"The person can see objects lying between",round(-u1,0),"cm and",-u2,"cm"
```

In [48]:

```
#Given
u=-25 #cm
p=3.0
#Calculation
f=100/p
v=1/((1/f)+1/u)
#Result
print"Distance is",round(v,0),"m"
```

In [56]:

```
#Given
u=-25.0 #cm
v=-90.0 #cm
#calculation
f=1/((1/v)-1/u)
f1=(1/2.0)*10**2
u=1/((1/v)-1/f1)
#Result
print"(i) focal length is",round(f,1),"cm"
print"(ii) Distance is",round(u,1),"cm"
```

In [61]:

```
#Given
D=25
f=5.0 #cm
#calculation
M=1+(D/f)
M1=D/f
#Result
print"The magnifying power if the final image is formed at the least distance is",M
print"The magnifying power if image is formed at infinity is",M1
```

In [69]:

```
#Given
f=4.80 #cm
a=1.20
v=-24.0 #cm
#Calculation
D=f/(a-1)
u=1/((1/v)-1/f)
#Result
print"(i) The least distance of distinct vision is",D,"cm"
print"(ii) Distance from the lens is",-u,"cm"
```

In [74]:

```
#Given
v0=15.0 #cm
f0=3.0 #cm
D=25
fe=9
#Calculation
u0=1/((1/v0)-1/f0)
M=-(v0*D)/(u0*fe)
#Result
print"Magnifying power is", round(M,1)
```

In [83]:

```
#Given
P1=1.5 #D
P2=20.0 #D
u=-25.0 #cm
#Calculation
f2=100/P2
M=1+(D/f2)
f1=100/P1
v=1/((1/f1)+1/u)
M1=1-(v/f2)
#Result
print"(i) The maximum magnifying power together with his glasses", M
print"(ii) The maximum magnifying power without glasses",M1
```

In [88]:

```
#Given
l=16
d=-2.5 #cm
f0=0.4 #cm
D=25
#Calculation
v0=l+d
u0=1/((1/v0)-1/f0)
M=-v0*D/(u0*d)
#Result
print"Magnifying power of the microscope is", M
```

In [106]:

```
#Given
f0=1.0
u0=-1.1 #cm
D=25
fe=5.0
ve=25.0
#Calculation
v0=1/((1/f0)+1/u0)
d=v0+fe
M=-(v0*D)/(u0*fe)
ue=-1/((1/ve)+1/fe)
D1=v0-ue
M1=-(v0/u0)*(1+(D/fe))
#Result
print"(i) Distance between the lenses when image is at infinity", d,"cm"
print"Magnifying power is",M
print"(ii) Distance between the lenses when image is at distinct vision",round(D1,2),"cm"
print"Magnifying Power is",M1
```

In [110]:

```
#Given
f0=200 #cm
fe=5.0 #cm
D=25.0 #cm
#Calculation
M=(f0/fe)*(1+(fe/D))
M1=f0/fe
#Result
print"(i) Magnifying power when image is formed at near point is", M
print"(ii) Magnifying power when image is formed at infinity",M1
```

In [112]:

```
#Given
fe=3
M=4
#Calculation
f0=fe*M
#Result
print"Focal length of the lenses is" ,f0,"cm and",fe,"cm"
```

In [118]:

```
#Given
u0=-200.0 #cm
f0=30.0 #cm
fe=3
#Calculation
v0=1/((1/f0)+1/u0)
a=v0+fe
#Result
print"Separation between the objective and eyepiece is", round(a,1),"cm"
```

In [126]:

```
#Given
ve=24.0
fe=8.0
f0=250.0
a=10
#Calculation
ue=1/((1/ve)-(1/fe))
D=f0-ue
d=a/2.0
A=d/f0
#Result
print"(i) Distance between objective and eyepiece is", D,"cm"
print"(ii) Angle subtended by the sun at the objective is",A,"rad"
```

In [131]:

```
#Given
M=-20
R=-120
#Calculation
f0=R/2.0
fe=f0/M
#Result
print"Focal length of eyepiece is", fe,"cm"
```

In [135]:

```
#Given
fa=180
f=3.5
fe=5.0
#Calculation
d=fa+(2*f)+(2*f)+fe
M=-fa/fe
#Result
print"Magnifying power of thetelescope is", M
```

In [147]:

```
#Given
u0=-200.0 #cm
fa=50.0 #cm
ve=-25.0 #cm
fe=5.0 #cm
#Calculation
v0=1/((1/fa)+1/u0)
M0=v0/u0
ue=1/((1/ve)-1/fe)
Me=ve/ue
D=v0-ue
M=M0*Me
#Result
print"(i) Saparation between the objective and eyepiece is", round(D,2),"cm"
print"(ii) Magnification is",M
```