+ It explains every line accurately, clearly, and without omissions.
- It is accurate but somewhat formal, with limited casual energy.
a friendly coding teacher. You are going to create a video to explain your code to your professor in a casual and engaging manner.
| Category | Writing › Scripts |
|---|---|
| Tags | DraftingDeveloperYouTube video |
Act as a friendly coding teacher. You are going to create a video to explain your code to your professor in a casual and engaging manner.
Your task is to create a script for the video in which you:
- Introduce the purpose of your code in a friendly tone.
- Explain each section of the code line-by-line.
- Use informal language and relatable examples to make it engaging.
- Ensure clarity by highlighting key functions and their roles.
- Conclude with a summary of what the code achieves.
You should:
- Start with a brief introduction of the project and its goals.
- Explain the logic behind the main blocks of code in a casual way, as if explaining to a friend.
- Keep the tone light and avoid technical jargon unless necessary.
- Use humor or anecdotes to keep it interesting.
Variables:
- ${codeSection} - The specific section of the code you are explaining
- ${tone:casual} - The overall tone of the explanation
- ${audience:professor} - Your target audience for the video
Example:
"Hi! In this video, I'm going to introduce you to my new project aimed at solving [problem]. Let's take a look at the code! First, we have the section [first section] that does [explanation]. It's like [analogy]. Let's move on to the next part..."This is useful when preparing a code presentation or assignment explanation video. It asks for a friendly tone, analogies, light humor, and technical terms only when necessary.
ChatGPT is the most accurate and balanced. Claude is the friendliest and most specific, while Gemini has strong production cues but notable fabrication and timing contradictions.
+ It explains every line accurately, clearly, and without omissions.
- It is accurate but somewhat formal, with limited casual energy.
+ Concrete analogies and examples make every code section approachable.
- It invents personal anecdotes and runs long with bonus material.
+ Staging cues and timestamps make it highly usable as a video script.
- It fabricates a professor quote and gives conflicting video lengths.
| Criterion | ChatGPT | Claude | Gemini | Leader |
|---|---|---|---|---|
| Instruction following | 9 | 9 | 9 | Tie |
| Accuracy | 10 | 8 | 6 | ChatGPT +25% |
| Specificity | 9 | 10 | 9 | Claude +11% |
| Structure | 8 | 9 | 9 | Tie |
| Right length | 9 | 7 | 7 | ChatGPT +29% |
Scored 1–10 by gpt-5.6-sol with model names hidden (2026-09-24). This is an AI review, not a measurement.
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.
[Pasted material]
[codeSection]
학교 과제로 제출한 '온라인 도서관 대출 시스템'의 핵심 파이썬 코드입니다.
```python
class Library:
def __init__(self):
self.books = {}
def add_book(self, title, count):
self.books[title] = self.books.get(title, 0) + count
def borrow_book(self, title):
if self.books.get(title, 0) > 0:
self.books[title] -= 1
return True
return False
def return_book(self, title):
self.books[title] = self.books.get(title, 0) + 1
```
[tone] casual — 친한 친구한테 설명하듯 편하게
[audience] 담당 교수님 (김민준 교수님, '프로그래밍 기초' 수업 기말 과제 발표 영상용)안녕하세요, 김민준 교수님.
이번 영상에서는 제가 프로그래밍 기초 기말 과제로 만든 온라인 도서관 대출 시스템의 핵심 코드를 소개하겠습니다.
이 프로그램은 도서관에 책을 등록하고, 책을 빌리고, 반납하는 기능을 간단하게 구현한 코드입니다. 말하자면 컴퓨터 안에 작은 도서관을 하나 만든 셈입니다. 사서 역할을 하는 프로그램이라고 보면 됩니다.
먼저 전체 코드를 보면서 하나씩 설명해 보겠습니다.
class Library:
첫 번째 줄에서는 Library라는 클래스를 만듭니다.
클래스는 도서관 운영에 필요한 기능들을 한곳에 모아 놓은 설계도입니다. 실제 도서관을 만들기 전에 먼저 도서관의 구조를 설계하는 것과 비슷합니다.
def __init__(self):
이 부분은 도서관 객체가 만들어질 때 자동으로 실행되는 초기화 함수입니다.
새로운 도서관이 문을 열 때 필요한 기본 준비를 하는 단계라고 생각하면 됩니다.
self.books = {}
여기서는 books라는 변수를 만들고 빈 딕셔너리를 저장합니다.
이 딕셔너리는 책 제목과 책의 수량을 기록하는 장부 역할을 합니다.
예를 들어 다음과 같이 저장될 수 있습니다.
{"파이썬 입문": 3, "자료구조": 2}
이 말은 파이썬 입문 책이 3권, 자료구조 책이 2권 있다는 뜻입니다. 책장 대신 딕셔너리에 책을 정리하는 셈입니다.
다음은 책을 추가하는 기능입니다.
def add_book(self, title, count):
add_book 함수는 책 제목과 추가할 권수를 입력받습니다.
예를 들어 "파이썬 입문"이라는 책을 3권 추가할 수 있습니다.
self.books[title] = self.books.get(title, 0) + count
이 한 줄에서 실제로 책의 수량을 계산합니다.
먼저 self.books.get(title, 0)은 해당 제목의 책이 이미 장부에 있는지 확인합니다. 책이 있으면 현재 수량을 가져오고, 아직 없으면 0을 사용합니다.
그다음 여기에 새로 추가할 count를 더합니다.
즉, 이미 파이썬 입문이 2권 있는데 3권을 추가하면 총 5권이 됩니다. 같은 책을 추가할 때마다 새로 덮어쓰지 않고 수량을 누적하는 방식입니다.
이번에는 책을 빌리는 기능입니다.
def borrow_book(self, title):
borrow_book 함수는 빌리고 싶은 책의 제목을 입력받습니다.
if self.books.get(title, 0) > 0:
이 조건문은 해당 책의 수량이 0보다 큰지 확인합니다.
쉽게 말해서 책장에 빌려줄 책이 한 권이라도 있는지 확인하는 부분입니다.
self.books[title] -= 1
책이 있다면 수량을 1권 줄입니다.
도서관에서 책 한 권이 대출되었으니 장부에서 하나를 빼는 것입니다.
return True
그리고 True를 반환합니다.
이 값은 “대출에 성공했습니다”라는 의미입니다.
반대로 책이 없으면 다음 코드가 실행됩니다.
return False
빌릴 책이 없을 때는 False를 반환합니다.
즉, 대출에 실패했다는 뜻입니다. 책이 없는데도 빌려준다고 하면 도서관이 아니라 마술쇼가 되기 때문에, 이런 확인 과정이 필요합니다.
마지막은 책을 반납하는 기능입니다.
def return_book(self, title):
return_book 함수는 반납하는 책의 제목을 입력받습니다.
self.books[title] = self.books.get(title, 0) + 1
반납된 책의 수량을 1권 증가시킵니다.
만약 장부에 해당 책이 이미 있으면 현재 수량에 1을 더하고, 장부에 없던 책이라면 0에서 시작해서 1권으로 기록합니다.
예를 들어 "파이썬 입문"이 현재 2권 있다면 반납 후에는 3권이 됩니다.
정리하면, 이 클래스는 세 가지 핵심 기능을 제공합니다.
첫째, add_book은 도서관에 책을 추가합니다.
둘째, borrow_book은 책이 남아 있을 때만 대출하고 수량을 1 줄입니다.
셋째, return_book은 반납된 책의 수량을 1 늘립니다.
이 코드의 장점은 책의 제목과 수량을 딕셔너리로 간단하게 관리한다는 점입니다. 또한 대출할 책이 있는지 먼저 확인하기 때문에 수량이 음수가 되는 문제도 막을 수 있습니다.
결론적으로 이 프로그램은 실제 온라인 도서관 시스템의 기본적인 동작을 간단하게 구현한 코드입니다. 책을 등록하고, 대출 가능 여부를 확인하고, 대출과 반납에 따라 재고를 자동으로 관리할 수 있습니다.
이상으로 온라인 도서관 대출 시스템의 핵심 코드 설명을 마치겠습니다. 감사합니다, 교수님.
| 2D documentary script generator | |
| Cartoon series | |
| Chain of Thought for Podcast Guest Analysis | |
| Cinematic Action Boxing Fantasy | |
| Create Satirical and Bold Song Lyrics |