input: Write a function to calculate the cube of a given integer number. Take the input from the user, compute the cube, and print the result. If the input is invalid, handle the exception and print an appropriate message.
  assert calculate_cube(3)==27
  assert calculate_cube(-2)==-8
  assert calculate_cube(0)==0
output: def calculate_cube(n):
      try:
          n = int(n)
          return n ** 3
      except ValueError:
          print("Invalid input. Please enter an integer.")