title: Divisibility By 7
signature: def divisibilityBy7(num: Int) = {
test_code: import scala.collection.mutable.HashMap
  import scala.collection.immutable.HashSet
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  
  // TESTING CODE 
  // ============================================
  def validateSolution(actual: Boolean , expected: Boolean): Boolean = {
      actual.toString == expected.toString
  }
  
  def driver(num: Int, expected: Boolean): String = {
      try {
          if (validateSolution(PLACEHOLDER_FN_NAME(num),expected)) {
              "PASSED"
          } else{
              "FAILED"
          }
      }catch{
          case e: Exception => {e.getClass.getName}
      }
  
  }
  object QuestionEvaluator extends App {
  
      println(s"TEST-0...${driver(
        0, 
        true    
      )}")   
  
  
      println(s"TEST-1...${driver(
        -21, 
        false    
      )}")   
  
  
      println(s"TEST-2...${driver(
        7, 
        true    
      )}")   
  
  
      println(s"TEST-3...${driver(
        63, 
        false    
      )}")   
  
  
      println(s"TEST-4...${driver(
        84, 
        false    
      )}")   
  
  
      println(s"TEST-5...${driver(
        73, 
        false    
      )}")   
  
  
      println(s"TEST-6...${driver(
        81, 
        false    
      )}")   
  
  
      println(s"TEST-7...${driver(
        -10, 
        false    
      )}")   
  
  
      println(s"TEST-8...${driver(
        47, 
        false    
      )}")   
  
  
      println(s"TEST-9...${driver(
        23, 
        false    
      )}")   
  
  }
  
source_py: def divisibility_by_7(num):
      if (num < 0):
          return divisibility_by_7((- num))
      if ((num == 0) or (num == 7)):
          return True
      if (num < 10):
          return False
      return divisibility_by_7(((num / 10) - (2 * (num - ((num / 10) * 10)))))
source_cpp: int divisibility_by_7(int num) {
    if ( num < 0 ) return divisibility_by_7 ( - num );
    if ( num == 0 || num == 7 ) return 1;
    if ( num < 10 ) return 0;
    return divisibility_by_7 ( num / 10 - 2 * ( num - num / 10 * 10 ) );
  }