In this python basic program, we will print the square and cube of a given number using the ** method.
Steps to solve the program
- Take a number as input.
- Print the square and cube using the ** (power) method.
- To print the square use **2 and for the cube use **3.
- Print the output.
num = 9
print("Square: ",num**2)
print("Cube: ",num**3)
Output :
Square: 81
Cube: 729