input: def select_based_on_prime(n, a, b):
      """A basic program that returns the value of a if n is a prime number, and returns the value of b otherwise.
  
      Examples:
      for select_based_on_prime(7, 34, 12) == 34
      for select_based_on_prime(15, 8, 5) == 5
  
      """
output:     def is_prime(x):
          if x <= 1:
              return False
          if x <= 3:
              return True
          if x % 2 == 0 or x % 3 == 0:
              return False
          i = 5
          while i * i <= x:
              if x % i == 0 or x % (i + 2) == 0:
                  return False
              i += 6
          return True
  
      return a if is_prime(n) else b