{
  "id": "ez-grader",
  "version": "925f824a8c85",
  "status": "published",
  "name": "EZ Grader",
  "question": "Teacher grader: what is the score?",
  "summary": "An online EZ grader for teachers: turns the number of questions and the number a student got wrong into a percentage score, with the score for every other number wrong on a chart.",
  "category": "education",
  "subcategory": "grades",
  "url": "https://www.acalculator.org/education/ez-grader",
  "markdown": "https://www.acalculator.org/education/ez-grader.md",
  "kind": "function",
  "method": "score = (questions − wrong) ÷ questions × 100; each question is worth 100 ÷ questions percentage points.",
  "assumptions": [
    "Every question is worth the same. For a test with points, enter the total points as the number of questions and the points lost as the number wrong.",
    "The number wrong may be a fraction (half credit); it cannot be more than the number of questions.",
    "Questions are whole numbers from 1 to 1,000. The score is shown to one decimal place, rounded half up from the exact fraction."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "n": {
        "title": "Number of questions",
        "description": "The number of questions on the test, or its total points when each question is worth one point.",
        "type": "integer",
        "minimum": 1,
        "maximum": 1000
      },
      "w": {
        "title": "Number wrong",
        "description": "How many questions the student got wrong. Half points such as 2.5 are fine.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000
      }
    }
  },
  "outputs": {
    "score": {
      "label": "Score",
      "description": "The share of the questions answered right: (questions − wrong) ÷ questions × 100.",
      "format": "percent"
    },
    "right": {
      "label": "Number right",
      "description": "Questions − wrong.",
      "format": "number"
    },
    "each": {
      "label": "Each question is worth",
      "description": "The percentage points one question adds to the score: 100 ÷ questions.",
      "format": "percent"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "n": 20,
      "w": 3
    },
    "outputs": {
      "score": 85,
      "right": 17,
      "each": 5
    },
    "text": "3 wrong out of 20 is a score of 85%."
  },
  "examples": [
    {
      "given": {
        "n": 20,
        "w": 3
      },
      "expect": {
        "score": 85,
        "right": 17,
        "each": 5
      },
      "source": "OpenStax, Prealgebra 2e, §6.2 (percent = amount ÷ base × 100), https://openstax.org/books/prealgebra-2e/pages/6-2-solve-general-applications-of-percent; hand calculation in content.mdx: 17 ÷ 20 × 100 = 85"
    },
    {
      "given": {
        "n": 30,
        "w": 7
      },
      "expect": {
        "score": 76.66666666666667,
        "right": 23,
        "each": 3.3333333333333335
      },
      "source": "hand calculation in content.mdx: 23 ÷ 30 × 100 = 76.67 (percent method from OpenStax Prealgebra 2e §6.2, https://openstax.org/books/prealgebra-2e/pages/6-2-solve-general-applications-of-percent)"
    },
    {
      "given": {
        "n": 25,
        "w": 2.5
      },
      "expect": {
        "score": 90,
        "right": 22.5,
        "each": 4
      },
      "source": "hand calculation in content.mdx: 22.5 ÷ 25 × 100 = 90"
    },
    {
      "given": {
        "n": 8,
        "w": 1
      },
      "expect": {
        "score": 87.5,
        "right": 7,
        "each": 12.5
      },
      "source": "hand calculation in content.mdx: 7 ÷ 8 × 100 = 87.5"
    },
    {
      "given": {
        "n": 40,
        "w": 0
      },
      "expect": {
        "score": 100,
        "right": 40,
        "each": 2.5
      },
      "source": "hand calculation in content.mdx: 40 ÷ 40 × 100 = 100"
    }
  ],
  "sources": [
    "OpenStax, Prealgebra 2e, §6.2 Solve General Applications of Percent (percent = amount ÷ base). https://openstax.org/books/prealgebra-2e/pages/6-2-solve-general-applications-of-percent",
    "Wikipedia, Academic grading in the United States (common scale: A 90–100%, B 80–89%, C 70–79%, D 60–69%, F below 60%). https://en.wikipedia.org/wiki/Academic_grading_in_the_United_States"
  ],
  "related": [
    "test-grade",
    "grade",
    "percentage",
    "semester-grade"
  ],
  "changelog": []
}
