
SLO-based practice chapter: no clean official PCTB book PDF for Class 8 Computer Science was available at build time, so this chapter is built from the PCTB/SNC Student Learning Outcomes (SLOs) for Class 8 Computer Science. It is practice material for the curriculum topics — NOT the official book exercise. When the official book is obtained, its exercise will replace this practice set. Nothing here is presented as a book page or an official question.
Chapter titles follow the PCTB/SNC curriculum progression for this class. All questions and answers below are original practice material written for this guide.
Scratch is a visual programming language: instead of typing code, you drag and drop blocks that snap together like puzzle pieces. A sprite is a character or object on the stage, and blocks tell it what to do.
Scratch removes typing errors — a block either fits or it does not — so beginners can focus on logic: sequence, selection and loops, the same ideas as in any language.
اسکریچ ایک بصری پروگرامنگ زبان ہے: کوڈ ٹائپ کرنے کے بجائے آپ بلاکس کو گھسیٹ کر جوڑتے ہیں جیسے پزل کے ٹکڑے۔ اسپرائٹ اسٹیج پر کردار یا چیز ہے اور بلاکس اسے بتاتے ہیں کہ کیا کرنا ہے۔ اسکریچ میں ٹائپنگ کی غلطیاں ختم ہو جاتی ہیں — بلاک یا تو جڑتا ہے یا نہیں — اس لیے نئے سیکھنے والے منطق پر توجہ دے سکتے ہیں۔
Scratch blocks map directly onto programming concepts: motion blocks move a sprite, looks blocks change its appearance, control blocks give loops (repeat) and conditions (if), sensing blocks react to keys or touches, and variables store numbers like a score.
An event block starts a script — 'when green flag clicked' or 'when space key pressed'. Every program is: when something happens, do these steps.
اسکریچ بلاکس براہ راست پروگرامنگ تصورات سے ملتے ہیں: موشن بلاکس اسپرائٹ کو حرکت دیتے ہیں، لکس بلاکس شکل بدلتے ہیں، کنٹرول بلاکس لوپ اور شرائط دیتے ہیں، سینسنگ بلاکس کیز یا چھونے پر ردعمل دیتے ہیں اور ویری ایبلز اسکور جیسے اعداد محفوظ کرتے ہیں۔ ایونٹ بلاک اسکرپٹ شروع کرتا ہے — جیسے سبز جھنڈا دبانے یا اسپیس کی دبانے پر۔ ہر پروگرام یہی ہے: جب کچھ ہو تو یہ مراحل کرو۔
A loop inside another loop is a nested loop — for example, repeat 4 times: draw a side, turn 90 degrees, and inside that, repeat a pattern. Nesting builds complex behaviour from simple repeats.
Custom blocks (Scratch's functions) bundle steps under one name — 'draw square' — so they can be reused. Cloning creates copies of a sprite at run time, for example many falling apples in a game, each acting independently.
لوپ کے اندر لوپ نیسٹڈ لوپ ہے — مثلاً 4 بار دہراؤ: ایک ضلع بناؤ، 90 ڈگری مڑو، اور اس کے اندر ایک نمونہ دہراؤ۔ نیسٹنگ سادہ تکرار سے پیچیدہ رویہ بناتی ہے۔ کسٹم بلاکس (اسکریچ کے فنکشنز) مراحل کو ایک نام کے تحت جمع کرتے ہیں جیسے 'مربع بناؤ' تاکہ دوبارہ استعمال ہو سکیں۔ کلوننگ چلتے وقت اسپرائٹ کی کاپیاں بناتی ہے جیسے کھیل میں گرتے ہوئے کئی سیب، ہر ایک آزادانہ عمل کرتا ہے۔
Build a project in small steps: first make one sprite move, test it, then add a second behaviour, test again. Testing after every small change makes bugs easy to find — you know the bug is in the last thing you changed.
Common Scratch bugs: a script that never starts (no event block), a loop without an exit, and two scripts fighting over one sprite. Read the blocks aloud, one by one — the bug is usually a block in the wrong order.
منصوبہ چھوٹے مراحل میں بنائیں: پہلے ایک اسپرائٹ کو حرکت دیں، جانچیں، پھر دوسرا رویہ شامل کریں، دوبارہ جانچیں۔ ہر چھوٹی تبدیلی کے بعد جانچ سے خرابی آسانی سے مل جاتی ہے کیونکہ آپ جانتے ہیں کہ خرابی آخری تبدیلی میں ہے۔ عام خرابیاں: اسکرپٹ جو کبھی شروع نہ ہو (ایونٹ بلاک نہیں)، بغیر نکلنے کے لوپ، اور دو اسکرپٹس کا ایک اسپرائٹ پر جھگڑا۔ بلاکس کو بلند آواز میں ایک ایک کر کے پڑھیں — خرابی عام طور پر غلط ترتیب میں ہوتا ہے۔
اس chapter کی exercise SLO-based practice ہے — MCQs, short اور long سوال اس guide کے لیے لکھے گئے ہیں, کتاب کی official exercise نہیں. جواب کے ساتھ practice کرو.
1. Scratch programs are built from:
Answer: (b) — Scratch uses blocks that snap together.
2. A sprite is:
Answer: (b) — Sprites are the characters/objects that act on the stage.
3. Which block starts a script when the green flag is clicked?
Answer: (b) — Event blocks start scripts, for example 'when green flag clicked'.
4. A loop inside another loop is called:
Answer: (b) — Loops inside loops are nested loops.
5. Cloning in Scratch means:
Answer: (b) — Cloning creates run-time copies of a sprite, each acting independently.
6. The best way to find a Scratch bug is:
Answer: (b) — Testing after every small change shows the bug is in the last change.
Answer: Scratch is a visual programming language in which programs are built by dragging blocks together instead of typing code.
Answer: With control blocks such as 'if ... then ...', which run enclosed blocks only when the condition is true.
Answer: A variable stores a value that can change, for example a score that increases when a sprite catches an apple.
Answer: A custom block bundles steps under one name (for example 'draw square') so the steps can be reused without copying them everywhere.
Answer: A loop with no exit condition, or a script that never starts because it has no event block.
Answer: Sprites: a basket (player) and falling apples (clones). Events: when green flag clicked, set score to 0 and start a forever loop that creates an apple clone every second. Motion: the basket moves with arrow keys; apples fall by changing y. Control: if an apple touches the basket, change score by 1 and delete the clone. Sensing detects the touch; variables hold the score. Test after each addition.
Answer: Loop: repeat 4 times {move 50 steps, turn 90 degrees} draws a square. Nested loop: repeat 3 times {draw a square, move aside} draws three squares — a loop inside a loop. Function (custom block): define 'draw square' once with the loop inside, then call it wherever a square is needed instead of repeating the blocks.
Answer: First check the script starts: is there an event block? Then read blocks aloud in order and check each condition. Test after every small change so the bug is in the last change. Use 'say' blocks to show variable values while running. Fix one thing at a time and retest; never change several blocks at once, or you will not know which change fixed it.
Scratch teaches real programming without typing errors: sprites act on a stage, event blocks start scripts, control blocks give loops and conditions, variables hold scores, custom blocks reuse steps, clones multiply sprites, and testing after every small change finds bugs fast.
Revision guidance: پہلے MCQs خود حل کرو, پھر جواب ملاؤ; short سوالوں کے جواب اپنے الفاظ میں لکھ کر practice کرو; long سوالوں کے لیے ہر section کی headings اور مثالیں یاد رکھو.
اسکریچ ٹائپنگ کی غلطیوں کے بغیر حقیقی پروگرامنگ سکھاتا ہے: اسپرائٹس اسٹیج پر عمل کرتے ہیں، ایونٹ بلاکس اسکرپٹ شروع کرتے ہیں، کنٹرول بلاکس لوپ اور شرائط دیتے ہیں، ویری ایبلز اسکور رکھتے ہیں، کسٹم بلاکس مراحل دوبارہ استعمال کرتے ہیں، کلونز اسپرائٹس بڑھاتے ہیں، اور ہر چھوٹی تبدیلی کے بعد جانچ خرابیاں جلد ڈھونڈ لیتی ہے۔
رہنمائی: پہلے ایم سی کیوز خود حل کریں پھر جوابات ملائیں؛ مختصر سوالات کے جوابات اپنے الفاظ میں لکھ کر مشق کریں؛ تفصیلی سوالات کے لیے ہر سیکشن کی سرخیاں اور مثالیں یاد رکھیں۔
Is chapter ke topics: What Is Scratch? · Scratch and Programming Concepts · Loops, Nesting, Functions and Cloning · Building and Debugging a Scratch Project · مشق
Topics (Urdu): اسکریچ کیا ہے؟ · اسکریچ اور پروگرامنگ کے تصورات · لوپس، نیسٹنگ، فنکشنز اور کلوننگ · اسکریچ منصوبہ بنانا اور خرابی دور کرنا
Revision guidance: پہلے MCQs خود حل کرو, پھر جواب ملاؤ; short سوالوں کے جواب اپنے الفاظ میں لکھ کر practice کرو; long سوالوں کے لیے ہر section کی headings اور مثالیں یاد رکھو.
Chapter-wise tests, fresh random papers اور instant score کے لیے PunjabTest.com کا میں test section دیکھو:
PunjabTest.com — Complete Guide Book • Class 8 Computer Science, Chapter 6 (SLO-based practice (not the official book exercise), Session 2026–27) • English + Urdu