title: Pythagorean Quadruple
signature: function pythagoreanQuadruple(a: number, b: number, c: number, d: number): boolean {
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;
  }
question_info.test_list: [{"idx": 0, "outputs": false, "inputs": {"a": 1, "b": 1, "c": 1, "d": 3}}, {"idx": 1, "outputs": false, "inputs": {"a": 3, "b": 2, "c": 5, "d": 38}}, {"idx": 2, "outputs": true, "inputs": {"a": 0, "b": 0, "c": 0, "d": 0}}, {"idx": 3, "outputs": false, "inputs": {"a": -1, "b": -1, "c": -1, "d": 1}}, {"idx": 4, "outputs": false, "inputs": {"a": 82, "b": 79, "c": 6, "d": 59}}, {"idx": 5, "outputs": false, "inputs": {"a": 14, "b": 57, "c": 35, "d": 29}}, {"idx": 6, "outputs": false, "inputs": {"a": 6, "b": 96, "c": 45, "d": 75}}, {"idx": 7, "outputs": false, "inputs": {"a": 13, "b": 7, "c": 3, "d": 63}}, {"idx": 8, "outputs": false, "inputs": {"a": 96, "b": 65, "c": 72, "d": 93}}, {"idx": 9, "outputs": false, "inputs": {"a": 70, "b": 33, "c": 6, "d": 2}}]
question_info.entry_cls_name: Solution
question_info.test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: boolean, expected: boolean): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(a: number, b: number, c: number, d: number, expected:boolean): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b, c, d),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(1, 1, 1, 3, false);
    console.log(`TEST-0...${result}`);
  
    result = driver(3, 2, 5, 38, false);
    console.log(`TEST-1...${result}`);
  
    result = driver(0, 0, 0, 0, true);
    console.log(`TEST-2...${result}`);
  
    result = driver(-1, -1, -1, 1, false);
    console.log(`TEST-3...${result}`);
  
    result = driver(82, 79, 6, 59, false);
    console.log(`TEST-4...${result}`);
  
    result = driver(14, 57, 35, 29, false);
    console.log(`TEST-5...${result}`);
  
    result = driver(6, 96, 45, 75, false);
    console.log(`TEST-6...${result}`);
  
    result = driver(13, 7, 3, 63, false);
    console.log(`TEST-7...${result}`);
  
    result = driver(96, 65, 72, 93, false);
    console.log(`TEST-8...${result}`);
  
    result = driver(70, 33, 6, 2, false);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: pythagoreanQuadruple
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js