Python Program To Compute Square And Cube Of Number

Write Python code to compute square and cube of give number

# WAP to Find Square and and Cube of Given Number

n = input("Enter the value :--> ")
n = int(n)

square = n ** 2
cube = n ** 3

print("\nSquare of the number :-->", square)
print("Cube of the number :-->", cube

Output:

Enter the value :--> 3

Square of the number :--> 9
Cube of the number :--> 27

<< Previous | Next >>


Leave a Reply

Your email address will not be published.