title: Divisibility By 7
signature: divisibilityBy7 :: Integer -> Bool
  divisibilityBy7 num = 
test_code: import Text.Printf
  import Control.Exception (catch, SomeException)
  import Data.Typeable
  import qualified Data.List as List
  import qualified Data.Map as Map
  import qualified Data.Set as Set
  
  -- SOLUTION CODE
  -- ============================================
  
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  validateSolution :: Bool -> Bool -> Bool
  validateSolution actual expected = do
      actual == expected
  
  
  driver :: Integer -> Bool -> String
  driver num expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME num) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (0) (True) )
  
      printf "TEST-1...%s\n" (driver (-21) (False) )
  
      printf "TEST-2...%s\n" (driver (7) (True) )
  
      printf "TEST-3...%s\n" (driver (63) (False) )
  
      printf "TEST-4...%s\n" (driver (84) (False) )
  
      printf "TEST-5...%s\n" (driver (73) (False) )
  
      printf "TEST-6...%s\n" (driver (81) (False) )
  
      printf "TEST-7...%s\n" (driver (-10) (False) )
  
      printf "TEST-8...%s\n" (driver (47) (False) )
  
      printf "TEST-9...%s\n" (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 ) );
  }