InstantGrader

Phase 1 – JSON loading and basic evaluation

Implement reading the JSON file, evaluating each mathematical expression, and comparing results with correct answers.

  • Load JSON structure
  • Evaluate expressions safely
  • Compare with correct answer
  • Assign points per problem

Functional result: Script computes each student’s total score based on evaluated answers and correctness.

Phase 2 – Statistics and pass evaluation

Add aggregation of results, statistics generation, and pass/fail counting.

  • Calculate grade distribution
  • Compute average and highest score
  • Count passed students
  • Display formatted summary

Functional result: Script outputs individual scores, global statistics, and total number of passing students.

JSON example:

{
    "Ion Popescu" : {
        "problema-1" : {
            "rezolvare": "1 + 2",
            "raspuns-corect": "3",
            "punctaj": 10
        },
        "problema-2" : {
            "rezolvare": "(2 + 3) * (1.3 + 3.7)",
            "raspuns-corect": "25",
            "punctaj": 20
        }
    },
    "Ileana Constantinescu" : {
        "problema-1" : {
            "rezolvare": "1 - 2",
            "raspuns-corect": "3",
            "punctaj": 10
        },
        "problema-2" : {
            "rezolvare": "10 - 100",
            "raspuns-corect": "25",
            "punctaj": 20
        }
    }
}