title: Program To Find The Area Of Pentagon
signature: function program_to_find_the_area_of_pentagon(a)
source_py: def program_to_find_the_area_of_pentagon(a):
      area = (((sqrt((5 * (5 + (2 * sqrt(5))))) * a) * a) / 4)
      return area
source_cpp: float program_to_find_the_area_of_pentagon(float a) {
    float area;
    area = ( sqrt ( 5 * ( 5 + 2 * ( sqrt ( 5 ) ) ) ) * a * a ) / 4;
    return area;
  }
question_info.entry_fn_name: program_to_find_the_area_of_pentagon
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(a, expected)
      local exec_result;
      local status, error_msg = pcall(function () 
          exec_result=PLACEHOLDER_FN_NAME(a) 
      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(2009.019461888707, 6944120.6857642615)
      print(string.format("TEST-0...%s",result))
  
      result = driver(-1480.5131394215787, 3771147.371815937)
      print(string.format("TEST-1...%s",result))
  
      result = driver(357.7870347569567, 220240.9998483103)
      print(string.format("TEST-2...%s",result))
  
      result = driver(-8040.293697508038, 111222537.30911414)
      print(string.format("TEST-3...%s",result))
  
      result = driver(3821.882657293133, 25130647.008061722)
      print(string.format("TEST-4...%s",result))
  
      result = driver(-6840.635072240347, 80508515.3102342)
      print(string.format("TEST-5...%s",result))
  
      result = driver(1623.036598830132, 4532163.809416133)
      print(string.format("TEST-6...%s",result))
  
      result = driver(-9714.00706195298, 162347573.54592204)
      print(string.format("TEST-7...%s",result))
  
      result = driver(3916.454769669618, 26389745.561382204)
      print(string.format("TEST-8...%s",result))
  
      result = driver(-669.068424712943, 770176.1075446572)
      print(string.format("TEST-9...%s",result))
  
  end
  
  main()
question_info.test_list: [{"idx": 0, "outputs": 6944120.6857642615, "inputs": {"a": 2009.019461888707}}, {"idx": 1, "outputs": 3771147.371815937, "inputs": {"a": -1480.5131394215787}}, {"idx": 2, "outputs": 220240.9998483103, "inputs": {"a": 357.7870347569567}}, {"idx": 3, "outputs": 111222537.30911414, "inputs": {"a": -8040.293697508038}}, {"idx": 4, "outputs": 25130647.008061722, "inputs": {"a": 3821.882657293133}}, {"idx": 5, "outputs": 80508515.3102342, "inputs": {"a": -6840.635072240347}}, {"idx": 6, "outputs": 4532163.809416133, "inputs": {"a": 1623.036598830132}}, {"idx": 7, "outputs": 162347573.54592204, "inputs": {"a": -9714.00706195298}}, {"idx": 8, "outputs": 26389745.561382204, "inputs": {"a": 3916.454769669618}}, {"idx": 9, "outputs": 770176.1075446572, "inputs": {"a": -669.068424712943}}]