| English | 의미 |
|---|---|
| operators/ˈɒpəreɪtəz/ | 연산자 |
| procedure/prəˈsiːdʒə/ | 절차 |
| function/ˈfʌŋkʃn/ | 함수 |
| relational/rɪˈleɪʃənl/ | 관계 |
| logical/ˈlɒdʒɪkl/ | 논리 |
| parameter/pəˈræmɪtə/ | 매개변수 |
| local variable/ˈləʊkl ˈveərɪəbl/ | 로컬 변수 |
| global/ˈɡləʊbl/ | 전역 |
The tools of a program
- Programs combine values with operators 运算符 and work with strings.
- To avoid repeating code, we use procedures 过程 and functions 函数.
- Good naming and comments make a program maintainable.
Operators
- Arithmetic:
+ - * /,^(power),MOD(remainder),DIV(whole-number part). e.g.17 MOD 5 = 2,17 DIV 5 = 3. - Relational 关系 (give a Boolean):
= < <= > >= <>(not equal). - Logical 逻辑:
AND(both true),OR(at least one),NOT(reverses).

A pre-condition (WHILE) loop tests before the body, so it may run zero times; a post-condition (REPEAT) loop tests after, so it runs at least once.
17 MOD 5은 무엇입니까?
난이도 2/5 · 140 코인 + 오늘 첫 완료 시 소액 보너스
MOD는 나머지: 17 ÷ 5 = 3 나머지 2.
17 DIV 5은 무엇입니까?
난이도 2/5 · 140 코인 + 오늘 첫 완료 시 소액 보너스
DIV는 정수 부분: 17 ÷ 5 = 3 (나머지 버림).
String handling
- A string is made of characters. Useful operations:
- LENGTH (number of characters), SUBSTRING (a part), UCASE (capitals), LCASE (small).
name ← "Computer"
OUTPUT LENGTH(name) // 8
OUTPUT SUBSTRING(name, 1, 4) // "Comp"

A variable is a named store whose value can change
SUBSTRING: 문자열의 일부를 가져오기
첫 번째 문자는 위치 1에 있습니다. SUBSTRING(Word, Start, Length)는 Start 위치에서 시작하여 Length 개 수의 문자를 가져옵니다 — 두 핸들을 드래그하여 생성된 호출을 읽어보십시오.
LENGTH("Computer")이 반환하는 것은 무엇입니까?
난이도 2/5 · 140 코인 + 오늘 첫 완료 시 소액 보너스
"Computer"는 8개의 문자를 가집니다.
각 연산자 또는 문자열 함수와 결과를 매칭하십시오.
난이도 2/5 · 140 코인 + 오늘 첫 완료 시 소액 보너스
MOD/DIV는 나눗셈을 나머지와 몫으로 나누며; LENGTH와 SUBSTRING는 문자열에 작업합니다.
Procedures, functions and good style
- A procedure does a task (run with
CALL); a function returns a value. - A parameter 参数 is a value passed in (up to three).
- A local variable 局部变量 exists only inside its subroutine (safer); a global 全局 is visible everywhere.
- Library routines:
MOD,DIV,ROUND,RANDOM. - A maintainable program uses meaningful names, comments, and subroutines.

The basic data types: integer, real, char, string and boolean
로컬 변수:
난이도 1/5 · 100 코인 + 오늘 첫 완료 시 소액 보너스
로컬 변수는 프로그램의 다른 부분이 실수로 변경할 수 없으므로 더 안전합니다.
함수는 값을 반환하여(수식 내에서 사용) 작업만 수행하는 서브루틴과 달리, 로컬 변수는 선언된 서브루틴 내부에서만 사용할 수 있습니다.
난이도 1/5 · 100 코인 + 오늘 첫 완료 시 소액 보너스
함수는 값을 반환하고, 로컬 변수는 서브루틴 내에서 변수를 보호하므로 모두 코드를 유지보수하기 쉽게 만듭니다.
You've got it
MOD= remainder,DIV= whole-number part; logicalAND/OR/NOT- strings: LENGTH, SUBSTRING, UCASE, LCASE
- a procedure does a task; a function returns a value; parameters pass values in
- local variables are safer than global; maintainable = meaningful names + comments + subroutines