Classify numeric scores with one threshold and summarize the decision.

Classify Scores

classify_scores.lua
local cutoff = 
local passed = 0

for _, score in ipairs({55, 72, 91}) do
  if score >= cutoff then
    passed = passed + 1
  end
end

local label = "review"
if passed >= 2 then
  label = "ready"
end

print("cutoff=" .. cutoff)
print("passed=" .. passed)
print("label=" .. label)
local cutoff = 
local passed = 0

for _, score in ipairs({55, 72, 91}) do
  if score >= cutoff then
    passed = passed + 1
  end
end

local label = "review"
if passed >= 2 then
  label = "ready"
end

print("cutoff=" .. cutoff)
print("passed=" .. passed)
print("label=" .. label)
local cutoff = 
local passed = 0

for _, score in ipairs({55, 72, 91}) do
  if score >= cutoff then
    passed = passed + 1
  end
end

local label = "review"
if passed >= 2 then
  label = "ready"
end

print("cutoff=" .. cutoff)
print("passed=" .. passed)
print("label=" .. label)
threshold A selected cutoff changes which records enter the passing group.
label The summary label is derived from the count, not stored in a table.