title: Sum Series 0 6 0 06 0 006 0 0006 N Terms
signature: sumSeries06006000600006NTerms :: Integer -> Double
  sumSeries06006000600006NTerms n = 
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 :: Double -> Double -> Bool
  validateSolution actual expected = do
      (abs (actual-expected)) < 1e-09
  
  driver :: Integer -> Double -> String
  driver n expected = do
      if (validateSolution (PLACEHOLDER_FN_NAME n) expected)
          then "PASSED"
      else "FAILED"
  
  main = do
      printf "TEST-0...%s\n" (driver (1) (0.5994) )
  
      printf "TEST-1...%s\n" (driver (2) (0.65934) )
  
      printf "TEST-2...%s\n" (driver (3) (0.665334) )
  
      printf "TEST-3...%s\n" (driver (4) (0.6659334) )
  
      printf "TEST-4...%s\n" (driver (5) (0.6659933400000001) )
  
      printf "TEST-5...%s\n" (driver (74) (0.666) )
  
      printf "TEST-6...%s\n" (driver (77) (0.666) )
  
      printf "TEST-7...%s\n" (driver (67) (0.666) )
  
      printf "TEST-8...%s\n" (driver (9) (0.665999999334) )
  
      printf "TEST-9...%s\n" (driver (12) (0.665999999999334) )
  
source_py: def sum_series_0_6_0_06_0_006_0_0006_n_terms(n):
      return (0.666 * (1 - (1 / pow(10, n))))
source_cpp: float sum_series_0_6_0_06_0_006_0_0006_n_terms(int n) {
    return ( 0.666 ) * ( 1 - 1 / pow ( 10, n ) );
  }