In [2]:

```
# Variables
l = 4.
w = 2.
sg = 0.75
z = 9810.
d = 0.5
# Calculations
v = l*w*d
wg = v*z*sg
s = 24000.
V = ((z*v)-wg)/s
V1 = (v*z-wg)/(s-z)
# Results
print "volume in m3 when block is completely in water",V,"m**3"
print "volume in m3 when block and concrete completely under water",round(V1,5),"m**3"
```

In [1]:

```
import math
# Variables
d = 1
s = 0.75
w = 9810
# Calculations
a = math.pi*d*d/4
h = d*0.5
p = w*h*s # intensity of pressure on at horizontal interface
v = p*a #vertical upward force
w1 = w*s*a*d/3 # weight of oil in upper hemisphere
vf = v-w1 # net vertical upward force
# Results
print "minimum weight of upper hemisphere in N",round(vf,4),"N"
```

In [4]:

```
# Variables
w = 90.
# Calculations
# By archemde's principle
# weight of water print alced = weight of sphere
z = 9810
v = w/z
d = (v*12/3.142)**0.33333
# Results
print "external diameter of hollow of sphere in m",round(d,4),"m"
```

In [5]:

```
# Variables
s1 = 13.6
s2 = 7.8
s3 = 1.
# Calculations
# by archimede principle
# weight of body = weight of liquid print laced
# s2 = s1*x+s3*(1-x)
x = (s2-s3)/(s1-s3)
# Results
print "fraction of steel below surface of mercury",round(x,2)
```

In [2]:

```
import math
# Variables
w = 9810.
do = 1.25
a = math.pi*do*do*0.25
# Calculations
f1 = w*a*1
f2 = w*a*3 # buoyancy force of 3m lenght of pipe
di = 1.2
s = 9.8
wg = w*s*3*((1.25**2)-(1.2**2))*0.25*math.pi
fa = f2-wg
# Results
print "buoyancy force in N/m",round(f1,3),"N/m"
print "upward force on anchor",fa,"N"
```

In [8]:

```
# Variables
a = 0.25
s1 = 11.5
s2 = 1.
z = 9810.
v1 = a*a*a*0.5
wc = v1*z
h = 0.016
# Calculations
# by archimede's principle
v2 = (a*0.5+h)*a*a # volume of cube submergerd
v = (v2-v1)/(s1-s2)
wl = v*s1*z
# Results
print "weight of lead attached",round(wl,3),"N"
```

In [9]:

```
# Variables
s1 = 19.3
s2 = 9.
x = 14./24
# Calculations
wg = x*10
wc = (1-x)*10
vg = wg/s1
vc = wc/s2
vt = vg+vc
# Results
print "volume of 10gm,14 carat gold in cm3",round(vt,3),"cc"
```

In [10]:

```
# Variables
h1 = 0.05
h2 = 0.015
s = 41./40
l = h1/(s-1)
w1 = 25
# Calculations
# applying bakance in vertical direction
w = w1*(l+h1)/(h2)
# Results
print "weight of ship in in N",round(w,3),"kN"
```

In [9]:

```
# Variables
w = 700.
w1 = 20000.
d = 0.5
h = 1.
wd = 250.
z = 9810.
# Calculations
f = z*3.142*d*d*2*0.25/3
n = (w*4+w1)/(f-250)
n1 = round(n)
# Results
print "number of drums",n1
```

In [11]:

```
# Variables
a = 0.12
l = 1.8
s = 0.7
z = 9810.
wp = s*a*a*l*z
v = a*a*(l-0.2)
w = v*z
t = w-wp
sp = 110000.
# Calculations
# applying equilibrium balance
w = t/(1-(9810/sp))
# Results
print "weight of lead in N",round(w,3),"N"
```

In [12]:

```
# Variables
d = 4.
h = 4.
s = 0.6
s1 = 1.
# Calculations
h1 = s*h/s1
v = 3.142*d*d*0.25*h1
x = h1/2
cog = h/2
h2 = cog-x
a = 3.142*d*d*d*d/64
bm = a/v
mh = bm-h2
# Results
print "metacentric height in m,negative sign indicte that cylinder is in unstable equilibrium",round(mh,4),"m"
```

In [13]:

```
# Variables
d = 4.
s1 = 0.6
s2 = 0.9
l = 1.
# Calculations
h = s1*l/s2
cob = h/2
cog = l/2
dcog = cog-cob
i = 3.142*d*d*d*d/64
v = 3.142*0.25*d*d*h
bm = i/v
bm = dcog
l = (6*1.5)**0.5
# Results
print "maximium lenght of cylinder in m",l,"m"
```

In [4]:

```
import math
# Variables
s = 2.
w = 340.
v = 0.5*s*s*s
z = 9810.
# Calculations
w1 = z*4
gb = s/4-s/8
i = s*s*s*s/(12)
v = 4
bm = i/v
gm = bm+gb
p = w/(w1*gm)
theta = math.degrees(math.atan(p))
# Results
print "angle through which cube will tilt in minutes",round((theta*60),3)
# note : rounding off error.
```

In [9]:

```
import math
# Variables
l = 60.
b = 9.
w = 16.*1000000
w1 = 160.*1000
y = 6.
q = 3.
sp = 10104.
# Calculations
i = 0.75*l*b*b*b/12
v = w/sp
bm = i/v
gm = (w1*y)/(w*(math.tan(math.radians(q))))
mcd = 2-bm
cogd = gm+mcd
# Results
print "metacentric height %.3f m "%gm
print "position of centre of gravity below the water line %.3f m"%cogd
```

In [15]:

```
import math
# Variables
w = 450000.
y = 5.5
w1 = 80.*1000000
q = 3.
# Calculations
gm = (w*y)/(w1*math.tan(math.radians(q)))
p = 12.5*1000
n = 120.
T = (p*60000)/(2*math.pi*n)
z = T/(w1*gm)
theta = math.degrees(math.atan(z))
# Results
print "angle of heel in degree %.4f"%theta
# note : rounding off error.
```

In [ ]:

```
```