Answer:
def display_cube(n):
for i in range(1, n+1):
print("Number is : {} and cube of the number is : {}".format(i, i**3))
# Test the function
display_cube(5)
Step-by-step explanation:
This program defines a function display_cube(n) that takes an integer n as an argument and prints out the cube of the numbers from 1 to n. The range() function is used to generate a sequence of numbers from 1 to n, and the print() function is used to display the number and its cube. The ** operator is used to calculate the cube of a number. You can test the function by calling it and passing in an integer value as an argument.