Python Code Example: volume and surface of a cube

This program calculates the volume and the surface area of a cube in separate functions.

def getVolume(a):
    volume = a * a * a
    return volume


def getSurface(a):
    surface = 6 * a * a
    return surface


edgeLength = int(input("Please enter the edge length: "))
print("Volume: " + repr(getVolume(edgeLength)))
print("Surface: " + repr(getSurface(edgeLength)))
Output
Please enter the edge length: 5 
Volume: 125
Surface: 150