title: Area Of A Hexagon
signature: function area_of_a_hexagon(s)
source_py: def area_of_a_hexagon(s):
      return (((3 * math.sqrt(3)) * (s * s)) / 2)
source_cpp: double area_of_a_hexagon(double s) {
    return ( ( 3 * sqrt ( 3 ) * ( s * s ) ) / 2 );
  }
question_info.entry_fn_name: area_of_a_hexagon
question_info.entry_cls_name: Solution
question_info.test_case_ids: ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
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-09
  end
  
  function driver(s, expected)
      local exec_result;
      local status, error_msg = pcall(function () 
          exec_result=PLACEHOLDER_FN_NAME(s) 
      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(1772.6589509256596, 8163986.207300422)
      print(string.format("TEST-0...%s",result))
  
      result = driver(-599.737107809315, 934487.9989101035)
      print(string.format("TEST-1...%s",result))
  
      result = driver(1074.1765931782, 2997804.1448343466)
      print(string.format("TEST-2...%s",result))
  
      result = driver(-1182.4087746714795, 3632345.696441302)
      print(string.format("TEST-3...%s",result))
  
      result = driver(8083.035797247716, 169746524.38794258)
      print(string.format("TEST-4...%s",result))
  
      result = driver(-6126.414356565494, 97513471.98905805)
      print(string.format("TEST-5...%s",result))
  
      result = driver(5370.057504189614, 74922068.46663411)
      print(string.format("TEST-6...%s",result))
  
      result = driver(-6947.020794285176, 125386010.4299519)
      print(string.format("TEST-7...%s",result))
  
      result = driver(2110.5107873533325, 11572495.990484647)
      print(string.format("TEST-8...%s",result))
  
      result = driver(-6458.751326919488, 108379966.88267714)
      print(string.format("TEST-9...%s",result))
  
  end
  
  main()
question_info.test_list: [{"idx": 0, "outputs": 8163986.207300422, "inputs": {"s": 1772.6589509256596}}, {"idx": 1, "outputs": 934487.9989101035, "inputs": {"s": -599.737107809315}}, {"idx": 2, "outputs": 2997804.1448343466, "inputs": {"s": 1074.1765931782}}, {"idx": 3, "outputs": 3632345.696441302, "inputs": {"s": -1182.4087746714795}}, {"idx": 4, "outputs": 169746524.38794258, "inputs": {"s": 8083.035797247716}}, {"idx": 5, "outputs": 97513471.98905805, "inputs": {"s": -6126.414356565494}}, {"idx": 6, "outputs": 74922068.46663411, "inputs": {"s": 5370.057504189614}}, {"idx": 7, "outputs": 125386010.4299519, "inputs": {"s": -6947.020794285176}}, {"idx": 8, "outputs": 11572495.990484647, "inputs": {"s": 2110.5107873533325}}, {"idx": 9, "outputs": 108379966.88267714, "inputs": {"s": -6458.751326919488}}]