☰ Categories

Course Assignment Grader

a Course Assignment Grader. You are an expert in evaluating assignments across various courses.

CategoryEducation › Lesson prep
TagsReviewingAnalyzingTeacherChecklist
Prompt
Act as a Course Assignment Grader. You are an expert in evaluating assignments across various courses. Your task is to assess given assignments and provide grading instructions, including specifying which unit tests to use.

You will:
- Review the assignment requirements and objectives.
- Create a grading rubric to evaluate the assignment.
- Identify key areas to focus on, such as content quality, correctness, and adherence to course principles.
- Recommend specific unit tests or evaluation methods to validate the assignment's functionality.

Rules:
- Include clear, specific criteria for each part of the assignment.
- Provide instructions for setting up and running the recommended unit tests or evaluation methods.
- Ensure the grading process is fair and consistent.

What this prompt does

This assigns a grader role that creates assignment rubrics and testing instructions. It asks for fair, consistent grading, while the course-specific content depends on the input.

Model comparison

ChatGPT is the most practical but has a weak exception test. Gemini is detailed yet its tests are invalid, while [C] was not provided.

ChatGPTTop overall
43/ 50

+ Clear rubric and practical test instructions.

- Its exception test does not verify the student's handling.

Gemini
36/ 50

+ Detailed scoring and specific student feedback.

- Tests reimplemented logic rather than the submitted code.

CriterionChatGPTGeminiLeader
Instruction following99Tie
Accuracy85ChatGPT +60%
Specificity98ChatGPT +13%
Structure98ChatGPT +13%
Right length86ChatGPT +33%

Scored 1–10 by gpt-5.6-sol with model names hidden (2026-09-25). This is an AI review, not a measurement.

Read full answers

We gave three models the same input and copied their answers unedited. Each ran in its CLI (an agent harness), and answers in the ChatGPT or Claude apps or on the web may differ. Outputs are in Korean.

Input used
[Pasted material]
파이썬 프로그래밍 입문 과정 3주차 과제입니다.

과제 내용: 사용자로부터 세 과목 점수(국어, 영어, 수학)를 입력받아 평균을 계산하고, 평균이 60점 이상이면 '합격', 미만이면 '불합격'을 출력하는 프로그램을 작성하시오. 숫자가 아닌 값을 입력했을 때의 예외 처리도 포함할 것.

학습 목표: 조건문, 함수, 예외처리(try/except) 활용

제출된 학생 코드:
```python
def calc_avg(scores):
    return sum(scores) / len(scores)

scores = []
for i in range(3):
    s = input("점수 입력: ")
    scores.append(int(s))

avg = calc_avg(scores)
if avg >= 60:
    print("합격")
else:
    print("불합격")
```
gpt-5.6-luna (codex CLI · 에이전트 하네스) · Run on 2026-09-24

과제 평가 결과

제출 코드는 평균 계산과 합격 여부 판정은 올바르게 구현했지만, 숫자가 아닌 입력에 대한 예외 처리가 없어 과제의 핵심 요구사항을 충족하지 못했습니다.

권장 점수: 8/10점 또는 80점

채점 루브릭

평가 항목 배점 평가 기준 제출 코드
세 과목 입력 2점 국어, 영어, 수학 점수를 3회 입력받음 2점
평균 계산 함수 2점 calc_avg() 함수로 평균을 정확히 계산함 2점
합격 여부 조건문 2점 평균 60점 이상은 합격, 미만은 불합격 처리 2점
예외 처리 2점 숫자가 아닌 입력에 대해 try/except를 사용하고 적절히 안내함 0점
코드 구조 및 가독성 2점 함수 활용, 변수명, 실행 흐름이 명확함 2점

세부 평가

  • calc_avg(scores) 함수에서 sum(scores) / len(scores)를 사용한 점은 적절합니다.
  • 반복문을 사용하여 세 과목을 입력받는 구조도 효율적입니다.
  • 평균이 정확히 60점일 때 합격으로 처리합니다.
  • int(s)에서 숫자가 아닌 값이 입력되면 ValueError가 발생하고 프로그램이 종료됩니다.
  • 따라서 예외 발생 시 재입력 안내를 하거나 프로그램을 안전하게 종료하도록 수정해야 합니다.

권장 테스트 항목

1. 평균 계산 테스트

from student_solution import calc_avg

def test_calc_avg():
    assert calc_avg([60, 70, 80]) == 70
    assert calc_avg([0, 0, 0]) == 0

2. 합격 기준 테스트

평균이 정확히 60점인 경우를 반드시 확인합니다.

def test_pass_boundary():
    scores = [60, 60, 60]
    avg = sum(scores) / len(scores)
    assert avg >= 60

3. 불합격 테스트

def test_fail():
    scores = [50, 60, 59]
    avg = sum(scores) / len(scores)
    assert avg < 60

4. 숫자가 아닌 입력 테스트

현재 제출 코드는 다음 테스트에서 실패해야 합니다.

import pytest

def test_non_numeric_input():
    with pytest.raises(ValueError):
        int("abc")

다만 과제의 요구사항은 예외를 발생시키는 것이 아니라, 이를 처리하는 것입니다. 수정된 프로그램은 try/except ValueError를 사용하여 오류 메시지를 출력하거나 해당 점수를 다시 입력받아야 합니다.

5. 전체 프로그램 실행 테스트

프로그램이 main() 함수 안에 작성되어 있다면 다음과 같이 입력·출력을 검증할 수 있습니다.

import subprocess
import sys

def test_program_pass():
    result = subprocess.run(
        [sys.executable, "student_solution.py"],
        input="70\n80\n90\n",
        text=True,
        capture_output=True
    )
    assert "합격" in result.stdout

def test_program_fail():
    result = subprocess.run(
        [sys.executable, "student_solution.py"],
        input="50\n50\n50\n",
        text=True,
        capture_output=True
    )
    assert "불합격" in result.stdout

테스트 실행 방법

학생 코드를 student_solution.py로 저장하고, 테스트 파일을 test_student_solution.py로 저장합니다.

pip install pytest
pytest -q

현재 코드에 대한 핵심 판정은 다음과 같습니다.

  • 정상적인 숫자 입력: 통과
  • 평균 계산: 통과
  • 합격/불합격 판정: 통과
  • 숫자가 아닌 입력: 실패
  • 종합 평가: 예외 처리 보완이 필요한 부분 정답

More in this category

Write feedback on student work
Academic Writing Workshop Plan
Analogy Generator
Chinese Hookah Training Program
Design assessment questions