Write a Python program to input a number print its cube.
Answers
Answered by
0
Answer:
def cube(num):
return num * num * num
num = int(input("Enter an any number : "))
cb = cube(num)
print("Cube of {0} is {1}".format(num, cb))
Output
Enter an any number : 6
Cube of 6 is 216
Answered by
0
n = int(input("input number: "))
print(f"Cube of {n} is {n ** 3}")
Similar questions