이 페이지는 최신 브라우저(SharedArrayBuffer 지원)가 필요합니다. Chrome, Edge, Firefox 또는 Safari를 최신 버전으로 업데이트해 주세요.
English
A variable stores a value
- A variable holds a value you can use and change.
- The arrow
←puts a value into a variable (this is assignment). - On your keyboard, type
<-(less-than, minus) — it means the same as←.

English
Age ← 16
OUTPUT Age // → 16
OUTPUT "Age" // → Age
English
DECLARE names the type
DECLAREstates a variable's name and its data type.- It is good style to declare a variable before you use it.

English
DECLARE Count : INTEGER
Count ← 0
OUTPUT Count // → 0
English
You can change a variable
- Assign again to give a variable a new value.
- The right-hand side is worked out first, then stored.
English
Total ← 10
Total ← Total + 5
OUTPUT Total // → 15
탐색하기
Watch the value change
← puts a value into a box. Assign again, and the box holds the new value.
English
A constant does not change
- A constant is a name for a value the program must not change, such as a pass mark or an hourly rate.
- The 2026–2028 syllabus writes
CONSTANT HourlyRate ← 6.50— the arrow, then a literal only. - If the number changes next year, you edit that one line and every use of the name follows.
English
CONSTANT PassMark ← 50
OUTPUT PassMark // → 50
English
Watch out
- Use meaningful names starting with a capital, with letters and digits only:
NumberOfPlayers. Conventional indices such asIandJare allowed. ←(or<-) means store into. It is not the=used to test equality.- A variable keeps its last value until you assign a new one.
OUTPUT Ageprints the number in the box.OUTPUT "Age"prints the word Age.
English
Common mistakes
DECLARE <identifier> : <data type>before you use a variable.- A constant is
CONSTANT <identifier> ← <value>. Assign a variable with←.
English
Now you try
- Type
<-for the←arrow. - Press Run to see the output, then Check answer.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Put 16 into a variable called Age, then OUTPUT it. (Type <- for the ← arrow.)
출력을 보려면 '실행'을 클릭하세요.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
DECLARE a variable Price as INTEGER, set it to 3, then OUTPUT Price * 4 (the answer is 12).
출력을 보려면 '실행'을 클릭하세요.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
설정 Total 부터 10, then add 5 to it, then OUTPUT Total (the answer is 15).
출력을 보려면 '실행'을 클릭하세요.
난이도 1/5 · 100코인 + 오늘 첫 완료 시 작은 보너스 추가
Declare a constant PassMark with the value 50, using ←, then OUTPUT it.
출력을 보려면 '실행'을 클릭하세요.