title: Program Print Sum Given Nth Term 1
signature: program_print_sum_given_nth_term_1 <- function(n) {
test_code: 
  
  
  # SOLUTION CODE
  # ============================================
  PLACEHOLDER_CODE_BODY
  
  # TESTING CODE 
  # ============================================
  validate_solution <- function(actual, expected) {
      abs(actual - expected) < 1e-06
  }
  
  driver <- function(n, expected){
      if (validate_solution(PLACEHOLDER_FN_NAME(n), expected)){
          "PASSED"
      } else{
          "FAILED"
      }
  }
  
  main <- function() {
      cat(sprintf("TEST-0...%s\n",driver(
          42L, 
          1764.0
      )))
  
      cat(sprintf("TEST-1...%s\n",driver(
          40L, 
          1600.0
      )))
  
      cat(sprintf("TEST-2...%s\n",driver(
          67L, 
          4489.0
      )))
  
      cat(sprintf("TEST-3...%s\n",driver(
          73L, 
          5329.0
      )))
  
      cat(sprintf("TEST-4...%s\n",driver(
          18L, 
          324.0
      )))
  
      cat(sprintf("TEST-5...%s\n",driver(
          16L, 
          256.0
      )))
  
      cat(sprintf("TEST-6...%s\n",driver(
          74L, 
          5476.0
      )))
  
      cat(sprintf("TEST-7...%s\n",driver(
          33L, 
          1089.0
      )))
  
      cat(sprintf("TEST-8...%s\n",driver(
          92L, 
          8464.0
      )))
  
      cat(sprintf("TEST-9...%s\n",driver(
          22L, 
          484.0
      )))
  
  }
  
  main()
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 );
  }