OUTPUT and sequence · เอาต์พุตและลำดับ
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.
รหัสจำลองคือภาษาของข้อสอบ
- หลักสูตร Cambridge IGCSE Computer Science 0478 สำหรับปี 2026, 2027 และ 2028 เขียนอัลกอริทึมใน 伪代码 — ไม่ใช่ Python หรือ Java
- มันอ่านเหมือนขั้นตอนธรรมดา, ดำเนินการจาก บนลงล่าง ลำดับนี้เรียกว่า ลำดับ (sequence)
- ด้านล่าง คุณสามารถ รัน pseudo code ที่คุณเขียนได้จริง
OUTPUT "Wake up"
OUTPUT "Brush teeth"
OUTPUT "Go to school"
One line after another · บรรทัดหนึ่งตามอีกบรรทัดหนึ่ง
Pseudocode runs top to bottom — each line after the one above it. This order is sequence. · Pseudocode ทำงานจาก บนลงล่าง — แต่ละบรรทัดจะทำงานตามบรรทัดที่อยู่เหนือมัน ลำดับนี้เรียกว่า *ลำดับ (sequence)*
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"
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
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เริ่มบรรทัดใหม่ - ช่องว่างหลังเครื่องหมาย colon ใน
Total: 7ต้องอยู่ ภายในเครื่องหมายคำพูด:OUTPUT "Total: ", 7
Common mistakes
OUTPUTshows a value; statements run in the order written.- Use the exam's exact keywords (
OUTPUT, notprint).
ข้อผิดพลาดที่พบบ่อย
OUTPUTแสดงค่า; คำสั่งดำเนินการตามลำดับที่เขียน- ใช้คำศัพท์เฉพาะของการสอบให้ถูกต้อง (เช่น
OUTPUTไม่ใช่print)
Now you try
- Type pseudocode in the box, then press Run to see its output.
- Press Check answer to test it.
ลองดูเลย
- พิมพ์伪代码ในกล่อง แล้วกด Run เพื่อดูเอาต์พุต
- กด Check answer เพื่อทดสอบ
Use OUTPUT to print the word Hello. · ใช้ OUTPUT เพื่อพิมพ์คำ Hello
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่
Print Red, Green and Blue, one per line, in that order. · พิมพ์ Red, Green และ Blue, หนึ่งบรรทัดต่อตัว, ตามลำดับนั้น
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่
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 ช่องว่างหลังจากเครื่องหมาย colon ต้องอยู่ ภายในเครื่องหมายอ Quotes แยกสองสิ่งนี้ออกด้วยลูกน้ำ
Click Run to see the output here. · คลิก Run เพื่อดูผลลัพธ์ที่นี่