title: Pythagorean Quadruple
signature: func pythagoreanQuadruple(a int, b int, c int, d int) bool {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual bool, expected bool) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(a int, b int, c int, d int, expected bool) string {
      if validateSolution(PLACEHOLDER_FN_NAME(a, b, c, d),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(1, 
  	1, 
  	1, 
  	3, false)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(3, 
  	2, 
  	5, 
  	38, false)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(0, 
  	0, 
  	0, 
  	0, true)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(-1, 
  	-1, 
  	-1, 
  	1, false)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(82, 
  	79, 
  	6, 
  	59, false)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(14, 
  	57, 
  	35, 
  	29, false)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(6, 
  	96, 
  	45, 
  	75, false)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(13, 
  	7, 
  	3, 
  	63, false)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(96, 
  	65, 
  	72, 
  	93, false)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(70, 
  	33, 
  	6, 
  	2, false)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
source_py: def pythagorean_quadruple(a, b, c, d):
      sum = (((a * a) + (b * b)) + (c * c))
      if ((d * d) == sum):
          return True
      else:
          return False
source_cpp: bool pythagorean_quadruple(int a, int b, int c, int d) {
    int sum = a * a + b * b + c * c;
    if ( d * d == sum ) return true;
    else return false;
  }