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