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.
الكود الوهمي هو لغة الامتحان
- منهج كامبريدج IGCSE علوم الحاسوب 0478 لـ 2026، 2027 و2028 يكتب الخوارزميات بـ الكود الوهمي — وليس بايثون أو جافا.
- يُقرأ كخطوات عادية، يُنفذ من الأعلى إلى الأسفل. هذا الترتيب يسمى التتابع.
- بالأسفل، يمكنك فعلياً تشغيل الكود الوهمي الذي تكتبه.
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. · يعمل الوصف الوهمي من الأعلى إلى الأسفل — كل سطر بعد الذي يسبقه. هذا الترتيب هو التتابع.
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يبدأ سطوراً جديدة. - المسافة بعد النقطتين الرأسيتين في
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.
الآن جرب بنفسك
- اكتب الكود الوهمي في الصندوق، ثم اضغط على تشغيل لرؤية مخرجاته.
- اضغط على تحقق من الإجابة لاختبارها.
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. · اضغط تشغيل لرؤية المخرجات هنا.