title: Program Calculate Volume Ellipsoid
signature: function program_calculate_volume_ellipsoid(r1, r2, r3)
source_py: def program_calculate_volume_ellipsoid(r1, r2, r3):
      return ((((1.33 * math.pi) * r1) * r2) * r3)
source_cpp: float program_calculate_volume_ellipsoid(float r1, float r2, float r3) {
    float pi = 3.14;
    return 1.33 * pi * r1 * r2 * r3;
  }
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(r1, r2, r3, expected)
      local exec_result;
      local status, error_msg = pcall(function () 
          exec_result=PLACEHOLDER_FN_NAME(r1, r2, r3) 
      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(3287.4842316041018, 4503.332888443404, 8590.24729914204, 531379639833.05774)
      print(string.format("TEST-0...%s",result))
  
      result = driver(-3707.427510963942, -6671.335781753231, -2780.4954870801926, -287348660250.6971)
      print(string.format("TEST-1...%s",result))
  
      result = driver(8980.643174783816, 3584.781688607942, 2818.469507143102, 379127256148.80035)
      print(string.format("TEST-2...%s",result))
  
      result = driver(-2698.0187368852694, -1004.7289573934537, -9602.530725071243, -108762980362.90225)
      print(string.format("TEST-3...%s",result))
  
      result = driver(8627.156664162168, 9572.27618966978, 4783.930377855004, 1650704251171.7974)
      print(string.format("TEST-4...%s",result))
  
      result = driver(-7316.329924623669, -6591.043206581106, -9760.465488363216, -1966615618344.9363)
      print(string.format("TEST-5...%s",result))
  
      result = driver(7857.3846206400485, 3671.761679299217, 2534.5825334137794, 305534635263.3107)
      print(string.format("TEST-6...%s",result))
  
      result = driver(-6502.657905007728, -1412.2240121470609, -6135.238350044512, -235411379188.32523)
      print(string.format("TEST-7...%s",result))
  
      result = driver(4468.400513325576, 2272.1999139470304, 4753.075799180736, 201639162973.6474)
      print(string.format("TEST-8...%s",result))
  
      result = driver(-7231.864791620428, -8036.087711033032, -6456.263512521035, -1567753314543.6833)
      print(string.format("TEST-9...%s",result))
  
  end
  
  main()
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 531379639833.05774, "inputs": {"r1": 3287.4842316041018, "r2": 4503.332888443404, "r3": 8590.24729914204}}, {"idx": 1, "outputs": -287348660250.6971, "inputs": {"r1": -3707.427510963942, "r2": -6671.335781753231, "r3": -2780.4954870801926}}, {"idx": 2, "outputs": 379127256148.80035, "inputs": {"r1": 8980.643174783816, "r2": 3584.781688607942, "r3": 2818.469507143102}}, {"idx": 3, "outputs": -108762980362.90225, "inputs": {"r1": -2698.0187368852694, "r2": -1004.7289573934537, "r3": -9602.530725071243}}, {"idx": 4, "outputs": 1650704251171.7974, "inputs": {"r1": 8627.156664162168, "r2": 9572.27618966978, "r3": 4783.930377855004}}, {"idx": 5, "outputs": -1966615618344.9363, "inputs": {"r1": -7316.329924623669, "r2": -6591.043206581106, "r3": -9760.465488363216}}, {"idx": 6, "outputs": 305534635263.3107, "inputs": {"r1": 7857.3846206400485, "r2": 3671.761679299217, "r3": 2534.5825334137794}}, {"idx": 7, "outputs": -235411379188.32523, "inputs": {"r1": -6502.657905007728, "r2": -1412.2240121470609, "r3": -6135.238350044512}}, {"idx": 8, "outputs": 201639162973.6474, "inputs": {"r1": 4468.400513325576, "r2": 2272.1999139470304, "r3": 4753.075799180736}}, {"idx": 9, "outputs": -1567753314543.6833, "inputs": {"r1": -7231.864791620428, "r2": -8036.087711033032, "r3": -6456.263512521035}}]
question_info.extension: lua
question_info.entry_fn_name: program_calculate_volume_ellipsoid
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: lua __FILENAME__