input: def is_cube(n):
      '''
      Write a function that takes an integer n and checks if it is a perfect cube.
      The function should return True if n is a perfect cube, otherwise False.
      Note: the input is guaranteed to be a valid integer.
      Examples:
      is_cube(1) ==> True
      is_cube(2) ==> False
      is_cube(-1) ==> True
      is_cube(64) ==> True
      is_cube(0) ==> True
      is_cube(180) ==> False
      '''
output:     if n < 0:
          n = -n
      cube_root = round(n ** (1/3))
      return cube_root ** 3 == n