OUTPUT and sequence · الإخراج والتسلسل
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
- Cambridge International AS Computer Science 9618 writes algorithms in pseudocode.
- Use the guide for exams in 2026. The guide for 2027, 2028 and 2029 uses the same syntax.
- Statements run from top to bottom. That order is sequence.
العربية
الكود الوهمي هو لغة الامتحان
- يكتب كامبريدج الدولي لـ علوم الحاسوب AS 9618 الخوارزميات في الكود الوهمي.
- استخدم الدليل لامتحانات 2026. الدليل لـ 2027، 2028 و 2029 يستخدم نفس الصيغة.
- الجمل تُنفذ من الأعلى إلى الأسفل. هذا الترتيب يسمى التسلسل.
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. · الكود الوهمي يعمل من الأعلى إلى الأسفل — كل سطر يأتي بعد الذي فوقه مباشرة.
English
OUTPUT shows a value
OUTPUTdisplays a value. Text goes in double quotes.- Each
OUTPUTstarts a new line. - Several values, separated by commas, print on one line.
العربية
OUTPUT يعرض قيمة
OUTPUTيعرض قيمة. النص يوضع بين علامتي اقتباس مزدوجة.- كل
OUTPUTيبدأ سطرًا جديدًا. - عدة قيم، مفصولة بفواصل، تطبع على سطر واحد.
OUTPUT "Hello, world!"
OUTPUT "You have ", 3, " lives left"
English
Watch out
- Keywords are capitals:
OUTPUT, notprint. - A comma keeps values on one line. A new
OUTPUTstarts the next line. - Joining two strings with
&is taught with the string functions.
العربية
انتبه
- الكلمات المفتاحية بحروف كبيرة:
OUTPUT، وليسprint. - الفاصلة تبقي القيم على سطر واحد.
OUTPUTجديد يبدأ السطر التالي. - دمج نصين مع
&يُدرَّس مع دوال النص.
English
Common mistakes
- Text needs quotes. A number does not:
OUTPUT 42. - Comments start with
//and run to the end of the line.
العربية
أخطاء شائعة
- النص يحتاج إلى علامات اقتباس. الرقم لا يحتاج:
OUTPUT 42. - تبدأ التعليقات بـ
//وتستمر حتى نهاية السطر.
English
Now you try
- Type pseudocode in the box, then press Run.
- 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 You have , the number 3, then lives left. · في سطر واحد، أخرج You have ، الرقم 3، ثم lives left.
Click Run to see the output here. · اضغط تشغيل لرؤية المخرجات هنا.