In this python basic program, we will calculate the area of a cube. We will use the the formula: 6*side*side,
Steps to solve the program
- Take the side of a cube as input through the user.
- Calculate the area of the cube using the formula: 6*side*side.
- Print the output.
side = int(input("Enter side of a cube: "))
area = 6*side*side
print("Area of cube: ",area)
Output :
Enter side of a cube: 6
Area of cube: 216