Create a Python program to check if the given number is divisible by 3 or not.
12
def is_divisible_by_3(n):
  return (n % 3 == 0)

n = 12
if is_divisible_by_3(n):
  print(str(n) + ' is divisible by 3.')
else:
  print(str(n) + ' is not divisible by 3.')