In [1]:

```
import math #Example16_1
#To find the magnitude of the electric field
v=12.0 #Units in V
d=5.0*10**-3 #units in Meters
e=v/d #Units in V/meter
print "The magnitude of electric field is E=",round(e)," V/meters"
```

In [2]:

```
import math #Example16_2
#To calculate the speed of the proton
q=1.6*10**-19 #Units in C
vab=45 #Units in V
m=1.67*10**-27 #Units in Kg
va=math.sqrt((2*q*vab)/m) #Units in meters/sec
print "The speed of the proton is Vab=",round(va,2)," meters/sec"
```

In [3]:

```
import math #Example16_3
#To find the sped of an electron
e=1.6*10**-19 #Units in C
vab=45 #Units in V
m=9.11*10**-31 #Units in Kg
va=math.sqrt((2*e*vab)/m) #Units in meters/sec
print "The speed of the electron is Vab=",round(va,2)," meters/sec"
```

In [4]:

```
import math #Example16_4
#To sketch the equipotentials and electric field lines near a charged metal object
print "Charged metal object have an equi potential volume so its surface is am equi potential volume\nBecause lines of force must be perpendiculat ro equipotential lines and surfaces."
```

In [5]:

```
import math #Example16_5
#To find the work done in carrying a proton and for an electron
q=1.6*10**-19 #Units in C
vab=9.0 #Units in V
work=q*vab #Units in J
print "The work done in carrying proton is="
print work
print "Joules\n"
q=-1.6*10**-19 #Units in C
work=q*vab #Units in J
print "The work done in carrying electron is="
print work
print "Joules\n"
```

In [6]:

```
import math #Example16_6
#To calculate the speed just befor it strikes it
va=8*10**6 #Units in meters/sec
q=1.6*10**-19 #Units in C
m=1.67*10**-27 #Units in Kg
vab=20000 #Units in V
vb=math.sqrt(va**2-((2*q*vab)/m)) #Units in meters/sec
print "The speed of proton before it strikes is Vb=",round(vb,1)," meters/sec"
```

In [7]:

```
import math #Example16_7
#To calculate the minimum value of Vab needed
print "Since each proton has a minimum energy of 13.6 eV and a charge of 1.602*10**-19 C\n The required potential difference is=13.6 eV"
```

In [8]:

```
import math #Example16_8
#To find out the speed of the proton
k=9*10**9 #Units in N meter**2/C**2
q=5*10.0**-6 #Units in C
r=0.5 #Units in meters
v1=(k*q)/r #Units in V
q=1.6*10**-19 #Units in V
m=1.672*10**-27 #Units in Kg
v=math.sqrt((v1*q*2)/m) #Units in V
print "The speed of electron is v=",round(v,2)," meters/sec"
```

In [9]:

```
import math #Example16_9
#To compute the absolute potential at B
k=9*10**9 #Units in N meter**2/C**2
q=5*10.0**-8 #Units in C
r=0.1 #Units in meters
v1=(k*q)/r #Units in V
q=8*10**-8 #Units in C
r=0.1 #Units in meters
v2=(k*q)/r #Units in V
q=40*10**-8 #Units in C
r=0.2 #Units in meters
v3=-(k*q)/r #Units in V
vb=v1+v2+v3 #Units in V
print "Due to 5*10**-8 C V1=",round(v1)," V\nDue to 8*10**-8 C V2=",round(v2)," V\nDue to 40*10**-8 C V3=",round(v3)," V\n Absolute potential at B is Vb=",round(vb)," V"
```

In [10]:

```
import math #Example16_10
#To find the absolute potential and how much energy is needed to pull the electrons from atom
k=9*10**9 #Units in N meter**2/C**2
q=1.6*10**-19 #Units in C
r=5.3*10**-11 #Units in meters
v=(k*q)/r #Units in V
print "The absolute potential is V=",round(v,1)," V\n"
Vinfinity=0 #Units in V
deltaV=Vinfinity-v #Units in V
work=-q*deltaV #Units in J
print "The energy that is required is W="
print round(work,20),"J"
```