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