# class.py

# tpm

# A program to calculate the volume and surface area of a sphere from its

# radius given as input.

```
from math import *
class Sphere:
def _init_(self, radius):
self.radius = radius
def getRadius(self):
return self.radius
def surfaceArea(self):
self.area = 4.0 * pi * self.radius ** 2
return self.area
def volume(self):
self.volume = 4.0 / 3.0 * pi * self.radius ** 3
return self.volume
def main():
r = input('Enter the radius of the sphere ')
s = Sphere(r)
print 'The surface area of the sphere is: ', s.surfaceArea()
print 'The volume of the sphere is: ', s.volume()
main()
```