Python Program to Find the Volume and Surface Area of a Cube

length = float(input("Enter the Length of any Side of a Cube: "))
# Surface Area of the Cube
sa = 6 * (length * length)
# Volume of the Cube
Volume = length * length * length
# Lateral Surface Area of Cube
LSA = 4 * (length * length)
# Print the Output
print("\nSurface Area of Cube = %.2f" %sa)
print("Volume of cube = %.2f" %Volume)
print("Lateral Surface Area of Cube = %.2f" %LSA)

OUTPUT:

Enter the Length of any Side of a Cube: 8
Surface Area of Cube = 384.00
Volume of cube = 512.00
Lateral Surface Area of Cube = 256.00

Leave a Comment