Python Program to Compute Volume and Surface Area of Cube

Python Program to Compute Volume and Surface Area of Cube

Write Python Program to Compute Volume and Surface Area of Cube

# Python Program to Compute Volume and Surface Area of Cube

side = 4

area_cube = 6 * side * side        # cube area formula
volume = side * side * side        # cube volume formula

print("Surface area of the cube having side ", side, " :--> ", area_cube)
print("Volume of the cube having side ", side, " :--> ", volume)

Output:

Surface area of the cube having side 4 :-->  96
Volume of the cube having side 4 :-->  64