Validation, verification and trace tables
도입됨
9:16
프로그래밍 개발 수명 주기
휴대폰의 모든 앱은 이런 사람이 작성했습니다. 하지만 그들은 코드를 타이핑하기 시작하지 않았습니다. 첫 줄보다 먼저, 문제를 연구하고, 해결책을…
영어 내레이션 · 영어와 중국어 자막 전환 가능
이 수업의 내용
| English | 의미 |
|---|---|
| data/ˈdeɪtə/ | Recorded facts, observations or values used for analysis or processing. |
| Validation/ˌvælɪˈdeɪʃn/ | Checking whether data meets specified rules for acceptable values or format. |
| verification/ˌverɪfɪˈkeɪʃn/ | Checking that data has been entered or copied accurately from its source, rather than deciding whether the source itself is correct. |
| trace table/treɪs ˈteɪbl/ | 추적표 |
| algorithm/ˈælɡərɪθəm/ | A finite sequence of precise steps for solving a problem or carrying out a task. |
| Range check/reɪndʒ tʃek/ | |
| length check/leŋθ tʃek/ | 길이 검사 |
| type check/taɪp tʃek/ | |
| presence check/ˈprezəns tʃek/ | 존재성 검사 |
| format check/ˈfɔːmæt tʃek/ | |
| check digit/tʃek ˈdɪdʒɪt/ | |
| Visual check/ˈvɪʒuːəl tʃek/ | A person compares the typed data with the original. |
| Double entry/ˈdʌbl ˈentri/ | The data is entered twice and the two copies are compared. |
| test data/test ˈdeɪtə/ | 테스트 데이터 |
| variable's | |
| normal/ˈnɔːml/ | In testing, ordinary valid input that should be accepted and produce the expected result. |
| abnormal/əbˈnɔːml/ | In testing, invalid or unsuitable input that the program should reject or handle appropriately. |
| extreme/ekˈstriːm/ | |
| boundary/ˈbaʊndəri/ | Input values at, just inside or just outside an allowed limit, used to check a program's handling of its valid range. |
| program/ˈprəʊɡræm/ | A set of instructions specifying operations for a computer to carry out. |
검증 및 추적
- 데이터가 입력될 때, 실수를 줄이기 위해 검증합니다.
- **검증(Validation)**은 합리적인지 확인하고, **검증(Verification)**은 올바르게 복사되었는지 확인합니다.
- 트레이스 표는 알고리즘을 단계별로 따라가며 실행 과정을 기록합니다.
검증
- **검증(Validation)**은 데이터가 합리적이고 규칙에 부합하는지 확인합니다 (데이터의 진위를 판단할 수는 없습니다).
- 범위 검증(한계 내), 길이 검증(올바른 문자 수), 타입 검증(올바른 데이터 유형), 존재 검증(빈칸 아님), 포맷 검증(올바른 패턴, 예: dd/mm/yyyy), 그리고 검증 숫자(숫자를 확인하는 추가 숫자).

모든 알고리즘은 입력, 처리, 출력으로 분해됩니다 — 여기서는 세 가지 점수의 평균을 구하는 과정입니다.

Checking that an age is between 0 and 120 is a:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
A range check confirms a value lies within allowed limits.
Match each validation check to its purpose.
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
Presence = not blank; type = right kind of data; format = right pattern.
검증(Verification)
- **검증(Verification)**은 데이터가 올바르게 복사되거나 입력되었는지 확인합니다 (타이핑 실수 여부).
- 시각적 검사 — 사람이 입력한 데이터를 원본과 비교합니다.
- 이중 입력 — 데이터를 두 번 입력하고 두 사본을 비교합니다.

선형 탐색은 시작점에서부터 각 항목을 순차적으로 확인하여 값을 찾습니다.
Double entry of data is a validation check.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
False. Double entry is a verification check: it confirms data was entered correctly. Validation checks that data is sensible, such as a range or type check.
Entering data twice and comparing the two copies is:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Double entry is a verification method — the two copies must match.
트레이스 표와 테스트 데이터
- 트레이스 표는 알고리즘 실행 시 각 변수의 값을 기록하여 작동 여부를 확인하거나 어떤 기능을 하는지 파악합니다.
- 테스트 데이터 유형: 정상(수용됨), 비정상(거부됨), 극단(허용된 최대/최소값), 경계(한계치의 양측 값, 예: 120 및 121).

트레이스 표는 프로그램 실행 시 각 변수의 값을 기록합니다

Fill in a trace table
A trace table follows the variables one line at a time. Step through and watch the counter and the running total change — exactly the skill a trace-table exam question tests.
A trace table is used to:
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Tracing helps you check an algorithm works, or work out what it does, by following the variables.
Trace total = 0; FOR i = 1 TO 5: total = total + i. What is total at the end?
난이도 2/5 · 140코인 + 오늘 첫 완료 시 작은 보너스 추가
1+2+3+4+5 = 15 — the value the trace table builds up row by row.
이 카드는 새로 추가되어 번역이 준비될 때까지 영어로 표시됩니다.
Worked example: test data for an exam mark
A program accepts whole-number exam marks from 0 to 100. Give one value of each type of test data.
- Normal: 57 (accepted). Abnormal: −8 or "ten" (rejected). Extreme: 0 and 100, the smallest and largest allowed values (accepted).
- Boundary: test each side of each limit: 100 (accepted) and 101 (rejected); 0 (accepted) and −1 (rejected). The check used is a range check 范围检查, plus a type check for "ten".

A program accepts ages 18 to 65. Which pair is boundary test data for the upper limit?
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Boundary data sits on each side of a limit: 65 should be accepted and 66 rejected.
Typing a new password twice is a validation check.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Double entry is verification: it checks the data was copied correctly, not that it is sensible.
이해했습니다
- 검증 = 합리적인가? (범위, 길이, 타입, 존재, 포맷, 검증 숫자)
- 검증(Verification) = 올바르게 복사되었는가? (시각적 검사, 이중 입력)
- 트레이스 표는 변수 값을 단계별로 추적합니다
- 테스트 데이터: 정상, 비정상, 극단, 경계
어떤 문제가 있었나요? 사이트 팀만 이 내용을 볼 수 있습니다.