title: Calculate Area Tetrahedron
signature: function calculate_area_tetrahedron(side)
source_py: def calculate_area_tetrahedron(side):
      volume = ((side ** 3) / (6 * math.sqrt(2)))
      return round(volume, 2)
source_cpp: double calculate_area_tetrahedron(int side) {
    double volume = ( pow ( side, 3 ) / ( 6 * sqrt ( 2 ) ) );
    return volume;
  }
question_info.test_code: 
  
  -- SOLUTION CODE
  -- ============================================
  PLACEHOLDER_CODE_BODY
  
  -- TESTING CODE 
  -- ============================================
  function isCorrect(actual, expected)
      if type(expected) ~= type(actual) then
          return false
      end
      
      if type(expected) == 'table' then
          for k,v_expected in pairs(expected) do
              
              if actual[k] == nil then
                  return false
              end
              local v_actual = actual[k]
              if not isCorrect(v_actual, v_expected) then
                  return false
              end
              actual[k]=nil
          end
      
          if next(actual) then 
              return false
          end
          return true
      else
          return actual == expected
      end
  end
  
  function validateSolution(actual, expected)
      return math.abs(actual - expected) < 1e-06
  end
  
  function driver(side, expected)
      local exec_result;
      local status, error_msg = pcall(function () 
          exec_result=PLACEHOLDER_FN_NAME(side) 
      end)
      if status then
          if validateSolution(exec_result,expected) then
              return "PASSED"
          end
          return "FAILED"
      else
          return string.format("ERROR=%s",string.gsub(error_msg,".*:[%d]+: ",""))
      end
  end
      
  function main()
      result = driver(58, 22994.17)
      print(string.format("TEST-0...%s",result))
  
      result = driver(56, 20696.54)
      print(string.format("TEST-1...%s",result))
  
      result = driver(35, 5052.87)
      print(string.format("TEST-2...%s",result))
  
      result = driver(99, 114350.83)
      print(string.format("TEST-3...%s",result))
  
      result = driver(13, 258.92)
      print(string.format("TEST-4...%s",result))
  
      result = driver(45, 10739.18)
      print(string.format("TEST-5...%s",result))
  
      result = driver(40, 7542.47)
      print(string.format("TEST-6...%s",result))
  
      result = driver(92, 91769.26)
      print(string.format("TEST-7...%s",result))
  
      result = driver(7, 40.42)
      print(string.format("TEST-8...%s",result))
  
      result = driver(13, 258.92)
      print(string.format("TEST-9...%s",result))
  
  end
  
  main()
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 22994.17, "inputs": {"side": 58}}, {"idx": 1, "outputs": 20696.54, "inputs": {"side": 56}}, {"idx": 2, "outputs": 5052.87, "inputs": {"side": 35}}, {"idx": 3, "outputs": 114350.83, "inputs": {"side": 99}}, {"idx": 4, "outputs": 258.92, "inputs": {"side": 13}}, {"idx": 5, "outputs": 10739.18, "inputs": {"side": 45}}, {"idx": 6, "outputs": 7542.47, "inputs": {"side": 40}}, {"idx": 7, "outputs": 91769.26, "inputs": {"side": 92}}, {"idx": 8, "outputs": 40.42, "inputs": {"side": 7}}, {"idx": 9, "outputs": 258.92, "inputs": {"side": 13}}]
question_info.extension: lua
question_info.entry_fn_name: calculate_area_tetrahedron
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: lua __FILENAME__