{
  "tool": "matric-nqf4.maths_compound_interest",
  "name": "Compound interest (CDU-GEN-NSC-400)",
  "answers": "A = P(1 + i)ⁿ and the interest earned, each substitution shown.",
  "degree": {
    "id": "competency:matric-nqf4",
    "code": "CDU-GEN-NSC-400",
    "name": "Senior Certificate (Amended) — exam-readiness programme (NQF 4 matric)",
    "version": "1.0.0"
  },
  "reference": "CAPS Grade 12 Mathematics, worked reference M17 (offline reconstruction); A = P(1 + i)ⁿ, i > −1",
  "endpoint": "/faculty/matric-nqf4/maths_compound_interest",
  "feeSt": 1,
  "inputSchema": {
    "type": "object",
    "required": [
      "pan",
      "principal",
      "ratePercent",
      "years"
    ],
    "properties": {
      "pan": {
        "type": "string",
        "description": "The student PAN — the degree must be held in one of its five slots",
        "pattern": "^[0-9 ]{16,19}$"
      },
      "principal": {
        "type": "number",
        "description": "P, the amount invested",
        "minimum": 0,
        "maximum": 1000000000
      },
      "ratePercent": {
        "type": "number",
        "description": "annual rate (percent)",
        "minimum": -99,
        "maximum": 1000
      },
      "years": {
        "type": "number",
        "description": "n, whole years",
        "minimum": 0,
        "maximum": 200
      }
    },
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "amount",
      "interestEarned"
    ],
    "properties": {
      "amount": {
        "type": "number",
        "description": "A after n years"
      },
      "interestEarned": {
        "type": "number",
        "description": "A − P"
      }
    },
    "additionalProperties": false
  },
  "example": {
    "principal": 10000,
    "ratePercent": 8,
    "years": 3
  }
}