title: Program Print Sum Given Nth Term 1
signature: programPrintSumGivenNthTerm1 :: Integer -> Double
  programPrintSumGivenNthTerm1 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-06
  
  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 (42) (1764.0) )
  
      printf "TEST-1...%s\n" (driver (40) (1600.0) )
  
      printf "TEST-2...%s\n" (driver (67) (4489.0) )
  
      printf "TEST-3...%s\n" (driver (73) (5329.0) )
  
      printf "TEST-4...%s\n" (driver (18) (324.0) )
  
      printf "TEST-5...%s\n" (driver (16) (256.0) )
  
      printf "TEST-6...%s\n" (driver (74) (5476.0) )
  
      printf "TEST-7...%s\n" (driver (33) (1089.0) )
  
      printf "TEST-8...%s\n" (driver (92) (8464.0) )
  
      printf "TEST-9...%s\n" (driver (22) (484.0) )
  
source_py: def program_print_sum_given_nth_term_1(n):
      return math.pow(n, 2)
source_cpp: int program_print_sum_given_nth_term_1(long n) {
    return pow ( n, 2 );
  }