title: Primality Test Set 1 Introduction And School Method
signature: pub fn primality_test_set_1_introduction_and_school_method(n: i32) -> bool {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: bool, expected: bool)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: bool)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        37, 
        true
      ));
      
      println!("TEST-1...{}", driver(
        39, 
        false
      ));
      
      println!("TEST-2...{}", driver(
        73, 
        true
      ));
      
      println!("TEST-3...{}", driver(
        8, 
        false
      ));
      
      println!("TEST-4...{}", driver(
        28, 
        false
      ));
      
      println!("TEST-5...{}", driver(
        66, 
        false
      ));
      
      println!("TEST-6...{}", driver(
        20, 
        false
      ));
      
      println!("TEST-7...{}", driver(
        36, 
        false
      ));
      
      println!("TEST-8...{}", driver(
        6, 
        false
      ));
      
      println!("TEST-9...{}", driver(
        51, 
        false
      ));
      
  }
source_py: def primality_test_set_1_introduction_and_school_method(n):
      if (n <= 1):
          return False
      for i in range(2, n):
          if ((n % i) == 0):
              return False
      return True
source_cpp: bool primality_test_set_1_introduction_and_school_method(int n) {
    if ( n <= 1 ) return false;
    for ( int i = 2;
    i < n;
    i ++ ) if ( n % i == 0 ) return false;
    return true;
  }