Python Program for Cube of a Number using Functions

Updated: May 18


Program:


def cube(num): return num * num * num num1 = int(input(" Please Enter any numeric Value : ")) a=cube(num1) print("The Cube of a Given Number {0} = {1}".format(num1, a))


Output:

Please Enter any numeric Value : 5 The Cube of a Given Number 5 = 125