title: Prime Numbers
signature: prime_numbers <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      toString(actual)==toString(expected)
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          2L, 
          TRUE
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          74L, 
          FALSE
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          46L, 
          FALSE
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          38L, 
          FALSE
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          51L, 
          FALSE
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          48L, 
          FALSE
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          6L, 
          FALSE
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          14L, 
          FALSE
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          31L, 
          TRUE
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          10L, 
          FALSE
      )))
  
  }
  
  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;
  }