Python Program to calculate the cube of a given number

Madhan Umk
Jan 1, 2024

--

Formula x³ (x*x*x)

def calculate_cube(number):
return number * number * number

numbers = [1,3,5,10]
for number in numbers:
print(f"The cube of {number} is {calculate_cube(number)}.")

#Result
The cube of 1 is 1.
The cube of 3 is 27.
The cube of 5 is 125.
The cube of 10 is 1000.
Python Program to calculate the cube of a given number

--

--

Madhan Umk
Madhan Umk

Written by Madhan Umk

90's Kid | Travel Blogger | #lyriclens | Photophile | Founder @lifeliker_in 🪄