Calculating and printing the cube of an integer

Report a typo

You are given a simple task of declaring a variable that equals the value of the cube of the given integer. Print the value of the resulting variable.

Sample Input 1:

5

Sample Output 1:

125

Sample Input 2:

3

Sample Output 2:

27
Write a program in Python 3
# Start by taking an integer input from the user

n = int(input())

# Now you need to calculate the cube of the given integer. The cube of a number can be calculated
# by multiplying the number by itself twice. In Python, we can write it as: number * number * number

# After getting the cube, assign it to a variable.

# Finally, print the calculated cube of the given integer using the print function.
___

Create a free account to access the full topic