title: Prime Numbers
signature: fun primeNumbers(n: Int): Boolean {
test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Boolean, expected:Boolean):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Boolean):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(2, true)
      println("TEST-0...${result}")
      
      result = driver(74, false)
      println("TEST-1...${result}")
      
      result = driver(46, false)
      println("TEST-2...${result}")
      
      result = driver(38, false)
      println("TEST-3...${result}")
      
      result = driver(51, false)
      println("TEST-4...${result}")
      
      result = driver(48, false)
      println("TEST-5...${result}")
      
      result = driver(6, false)
      println("TEST-6...${result}")
      
      result = driver(14, false)
      println("TEST-7...${result}")
      
      result = driver(31, true)
      println("TEST-8...${result}")
      
      result = driver(10, false)
      println("TEST-9...${result}")
      
          
  }
  
  main()
source_py: def prime_numbers(n):
      if (n <= 1):
          return False
      for i in range(2, n):
          if ((n % i) == 0):
              return False
      return True
source_cpp: bool prime_numbers(int n) {
    if ( n <= 1 ) return false;
    for ( int i = 2;
    i < n;
    i ++ ) if ( n % i == 0 ) return false;
    return true;
  }