Class 5 Computer Science Chapter 6 (C52406 - स्क्रैच / Scratch): Coordinates in Scratch (x and y range from -200 to 200; default center position is x=0, y=0; setting x=100, y=0 moves Sprite right; setting x=100, y=50 moves Sprite up), Event Blocks (when green flag clicked, when space key pressed, when this sprite clicked), Sensing Blocks (ask 'What's your name?' and wait), and Control Blocks (1. Repeat, 2. Forever, 3. If...then, 4. If...then...else, 5. Wait until, 6. Repeat until, 7. Stop all).
Page 1 of 7 • Textbook Page 65
अध्याय 6 स्क्रैच Scratch (C52406). 6.1 स्क्रैच में निर्देशांक (Coordinates in Scratch): स्क्रीन में किसी बिंदु या आकृति (स्प्राइट) की स्थिति निर्धारित करने के लिए x और y निर्देशांक का उपयोग होता है। स्क्रैच में x और y का मान -200 से 200 के बीच होता है।
Page 2 of 7 • Textbook Page 66
Step 1: प्रारंभ में x और y का मान डिफ़ॉल्ट रूप से x=0, y=0 पर सेट होता है (स्क्रीन के मध्य बिंदु पर)। Step 2: x=100, y=0 करने पर स्प्राइट 100 अंक आगे जाती है। Step 3: x=100, y=50 करने पर स्प्राइट 50 अंक ऊपर की ओर बढ़ती है।
Page 3 of 7 • Textbook Page 67
6.2 इवेंट ब्लॉक (Event Block): Event (घटना) वह है जो घटित होती है। प्रमुख इवेंट ब्लॉक: when green flag clicked, when space key pressed, when this sprite clicked, when backdrop switches to, when I receive message1.
Page 4 of 7 • Textbook Page 68
इवेंट का उदाहरण: 'when green flag clicked' के नीचे Looks से 'say Hello' जोड़कर हरा झंडा दबाने पर स्प्राइट 'Hello!' कहता है।
Page 5 of 7 • Textbook Page 69
6.3 सेंसिंग ब्लॉक (Sensing Block): बिना बताए किसी वस्तु को महसूस/अनुभव करना। उदाहरण: 'ask What is your name? and wait' ब्लॉक से नाम पूछना।
Page 6 of 7 • Textbook Page 70
6.4 कन्ट्रोल ब्लॉक (Control Block): स्प्राइट की गति व क्रम को नियंत्रित करते हैं। 1. Repeat (कार्य को दोहराएगा), 2. Forever (कार्य को निरंतर/लगातार करेगा), 3. If...then, 4. If...then...else.
Page 7 of 7 • Textbook Page 71
5. Wait until (शर्त सत्य होने तक प्रतीक्षा), 6. Repeat Until (जब तक शर्त सत्य न हो जाए तब तक दोहराना), 7. Stop all (चल रहे सभी कार्यों को रोकना)। मुख्य बिंदु।