OUTPUT and sequence · OUTPUT 与顺序
This page needs a recent browser (with SharedArrayBuffer support). Please update Chrome, Edge, Firefox or Safari to the latest version. · 此页面需较新浏览器(支持 SharedArrayBuffer)。请升级 Chrome、Edge、Firefox 或 Safari 至最新版本。
English
Pseudocode is the exam's language
- The Cambridge IGCSE Computer Science 0478 syllabus for 2026, 2027 and 2028 writes algorithms in pseudocode — not Python or Java.
- It reads like plain steps, run from top to bottom. This order is called sequence.
- Below, you can actually run the pseudocode you write.
中文
伪代码是考试的语言
- 剑桥 IGCSE 计算机科学 0478(2026、2027 与 2028 考纲)用伪代码(pseudocode)写算法 —— 不是 Python 或 Java。
- 它读起来就像一条条朴素的步骤,从上到下运行。这种顺序叫顺序结构(sequence)。
- 在下面,你可以真正运行自己写的伪代码。
OUTPUT "Wake up"
OUTPUT "Brush teeth"
OUTPUT "Go to school"
Explore · 探索
One line after another · 一行接着一行
Pseudocode runs top to bottom — each line after the one above it. This order is sequence. · 伪代码从上到下运行 —— 每一行接在上一行之后。这种顺序就是顺序结构。
English
OUTPUT shows text
OUTPUTdisplays a value on the screen.- Text goes in double quotes:
"Hello". - Each
OUTPUTstarts a new line.
中文
OUTPUT 显示文本
OUTPUT把一个值显示在屏幕上。- 文本放在双引号里:
"Hello"。 - 每个
OUTPUT都另起一行。
OUTPUT "Hello, world!"
OUTPUT "IGCSE Computer Science"
English
OUTPUT can join items
- List several items after
OUTPUT, separated by commas. - They print side by side, with no gaps.
中文
OUTPUT 可以拼接多项
- 在
OUTPUT后面列出多项,用逗号隔开。 - 它们会并排打印,中间没有空隙。
OUTPUT "Total: ", 7 // → Total: 7
English
Watch out
- Text needs double quotes; numbers do not (
OUTPUT 7is fine). - A comma joins items on one line; a new
OUTPUTstarts a new line. - The space after the colon in
Total: 7belongs inside the quotes:OUTPUT "Total: ", 7.
中文
注意
- 文本必须加双引号;数字不用(
OUTPUT 7没问题)。 - 逗号把多项拼在一行;新的
OUTPUT另起一行。 Total: 7里冒号后的空格写在引号里面:OUTPUT "Total: ", 7。
English
Common mistakes
OUTPUTshows a value; statements run in the order written.- Use the exam's exact keywords (
OUTPUT, notprint).
中文
常见错误
OUTPUT显示一个值;语句按书写顺序运行。- 使用考试的确切关键词(
OUTPUT,而不是print)。
English
Now you try
- Type pseudocode in the box, then press Run to see its output.
- Press Check answer to test it.
中文
现在轮到你
- 在框里输入伪代码,然后按 Run 看它的输出。
- 按检查答案来测试它。
Use OUTPUT to print the word Hello. · 用 OUTPUT 打印单词 Hello。
Click Run to see the output here. · 点击“运行”查看此处输出。
Print Red, Green and Blue, one per line, in that order. · 按顺序打印 Red、Green、Blue,每行一个。
Click Run to see the output here. · 点击“运行”查看此处输出。
On one line, output Total: then a space then the number 7, so it reads Total: 7. The space after the colon belongs inside the quotes. Separate the two items with a comma. · 在一行里,输出 Total: 再接一个空格再接数字 7,使它显示为 Total: 7。冒号后的空格写在引号里面。两项之间用逗号隔开。
Click Run to see the output here. · 点击“运行”查看此处输出。