input: Write a function to calculate the cube of a given integer and print the result. The function should take an integer input from the user and return the cube of that number. If the input is not a valid integer, the function should print an error message and prompt the user to enter a valid number.
  assert cube_calculator(3)==27
  assert cube_calculator(5)==125
  assert cube_calculator(-2)==-8
  assert cube_calculator(0)==0
  assert cube_calculator(10)==1000
output: def cube_calculator(n):
      try:
          n = int(n)
          return n ** 3
      except ValueError:
          print("Error: Please enter a valid integer.")