تدريب 2 - كتاب المهارات الرقمية - الصف 8 - الفصل 1 - المملكة العربية السعودية

الكتاب: كتاب المهارات الرقمية - الصف 8 - الفصل 1 | المادة: المهارات الرقمية | المرحلة: الصف 8 | الفصل الدراسي: 1

الدولة: المملكة العربية السعودية | المنهج: المنهج السعودي - وزارة التعليم

الدرس: تدريب 2

📚 معلومات الصفحة

الكتاب: كتاب المهارات الرقمية - الصف 8 - الفصل 1 | المادة: المهارات الرقمية | المرحلة: الصف 8 | الفصل الدراسي: 1

الدولة: المملكة العربية السعودية | المنهج: المنهج السعودي - وزارة التعليم

نوع المحتوى: تمارين وأسئلة

📝 ملخص الصفحة

📝 صفحة تمارين وأسئلة

هذه الصفحة تحتوي على أسئلة مرقمة للواجبات والتقييم.

راجع تبويب الواجبات للإجابات الكاملة على أسئلة الصفحة.

📋 المحتوى المنظم

📖 محتوى تعليمي مفصّل

تدريب 2

نوع: محتوى تعليمي

تدريب 2

نوع: QUESTION_HOMEWORK

اكتب رقم اللبنة البرمجية أمام الأمر الصحيح بلغة بايثون.

نوع: METADATA

وزارة التعليم Ministry of Education 2025 - 1447

نوع: METADATA

362

🔍 عناصر مرئية

A blue programming block labeled with the number 1. It contains the text 'اضبط سرعة القيادة إلى 20 %' (Set drive speed to 20%). It has a dropdown for '20' and a '%' symbol.

An orange programming block labeled with the number 2. It contains the text 'مجموعة speed إلى 20' (Set speed to 20). It has a dropdown for 'speed' and a numerical input '20'.

An orange C-shaped programming block labeled with the number 3. It contains the text 'تكرار 20' (Repeat 20) and has a numerical input '20'. The C-shape indicates a loop structure.

A blue programming block labeled with the number 4. It contains the text 'تحرك إلى الأمام 300 عدد mm' (Move forward 300 mm). It has dropdowns for 'إلى الأمام' (forward) and 'mm' (millimeters), and a numerical input '300'.

A blue programming block labeled with the number 5. It contains the text 'تحرك إلى الخلف 300 عدد mm' (Move backward 300 mm). It has dropdowns for 'إلى الخلف' (backward) and 'mm' (millimeters), and a numerical input '300'.

A text box containing the Python code: 'speed = 20'. There is an empty circle to its right, indicating a place for a matching answer.

A text box containing the Python code: 'drivetrain.set drive velocity(20, PERCENT)'. There is an empty circle to its right, indicating a place for a matching answer.

A text box containing the Python code: 'drivetrain.drive_for(FORWARD, 300, MM)'. There is an empty circle to its right, indicating a place for a matching answer.

A text box containing the Python code: 'for repeat_count in range(20):'. There is an empty circle to its right, indicating a place for a matching answer.

A text box containing the Python code: 'drivetrain.drive_for(REVERSE, 300, MM)'. There is an empty circle to its right, indicating a place for a matching answer.

The logo of the Ministry of Education, with text 'وزارة التعليم' (Ministry of Education) and 'Ministry of Education 2025 - 1447' below it.

The page number '362' printed at the bottom right corner of the page.

📄 النص الكامل للصفحة

--- SECTION: تدريب 2 --- تدريب 2 اكتب رقم اللبنة البرمجية أمام الأمر الصحيح بلغة بايثون. 1. speed = 20 2. drivetrain.set drive velocity(20, PERCENT) 3. drivetrain.drive_for(FORWARD, 300, MM) 4. for repeat_count in range(20): 5. drivetrain.drive_for(REVERSE, 300, MM) وزارة التعليم Ministry of Education 2025 - 1447 362 --- VISUAL CONTEXT --- **PROGRAMMING_BLOCK**: Untitled Description: A blue programming block labeled with the number 1. It contains the text 'اضبط سرعة القيادة إلى 20 %' (Set drive speed to 20%). It has a dropdown for '20' and a '%' symbol. Key Values: 20% Context: Represents a command to set the robot's drive velocity. **PROGRAMMING_BLOCK**: Untitled Description: An orange programming block labeled with the number 2. It contains the text 'مجموعة speed إلى 20' (Set speed to 20). It has a dropdown for 'speed' and a numerical input '20'. Key Values: 20 Context: Represents a command to assign a value to a variable named 'speed'. **PROGRAMMING_BLOCK**: Untitled Description: An orange C-shaped programming block labeled with the number 3. It contains the text 'تكرار 20' (Repeat 20) and has a numerical input '20'. The C-shape indicates a loop structure. Key Values: 20 Context: Represents a loop structure that repeats an action 20 times. **PROGRAMMING_BLOCK**: Untitled Description: A blue programming block labeled with the number 4. It contains the text 'تحرك إلى الأمام 300 عدد mm' (Move forward 300 mm). It has dropdowns for 'إلى الأمام' (forward) and 'mm' (millimeters), and a numerical input '300'. Key Values: 300 Context: Represents a command to move the robot forward by a specified distance. **PROGRAMMING_BLOCK**: Untitled Description: A blue programming block labeled with the number 5. It contains the text 'تحرك إلى الخلف 300 عدد mm' (Move backward 300 mm). It has dropdowns for 'إلى الخلف' (backward) and 'mm' (millimeters), and a numerical input '300'. Key Values: 300 Context: Represents a command to move the robot backward by a specified distance. **CODE_SNIPPET**: Untitled Description: A text box containing the Python code: 'speed = 20'. There is an empty circle to its right, indicating a place for a matching answer. Key Values: 20 Context: Python command for variable assignment. **CODE_SNIPPET**: Untitled Description: A text box containing the Python code: 'drivetrain.set drive velocity(20, PERCENT)'. There is an empty circle to its right, indicating a place for a matching answer. Key Values: 20, PERCENT Context: Python command to set the drive velocity of a robot's drivetrain. **CODE_SNIPPET**: Untitled Description: A text box containing the Python code: 'drivetrain.drive_for(FORWARD, 300, MM)'. There is an empty circle to its right, indicating a place for a matching answer. Key Values: FORWARD, 300, MM Context: Python command to drive a robot forward for a specified distance in millimeters. **CODE_SNIPPET**: Untitled Description: A text box containing the Python code: 'for repeat_count in range(20):'. There is an empty circle to its right, indicating a place for a matching answer. Key Values: 20 Context: Python command for a 'for' loop that iterates 20 times. **CODE_SNIPPET**: Untitled Description: A text box containing the Python code: 'drivetrain.drive_for(REVERSE, 300, MM)'. There is an empty circle to its right, indicating a place for a matching answer. Key Values: REVERSE, 300, MM Context: Python command to drive a robot in reverse for a specified distance in millimeters. **FIGURE**: Untitled Description: The logo of the Ministry of Education, with text 'وزارة التعليم' (Ministry of Education) and 'Ministry of Education 2025 - 1447' below it. Context: Metadata indicating the publisher and copyright year. **TEXT**: Untitled Description: The page number '362' printed at the bottom right corner of the page. Context: Page navigation metadata.

✅ حلول أسئلة الكتاب الرسمية

عدد الأسئلة: 1

سؤال 2: تدريب 2: اكتب رقم اللبنة البرمجية أمام الأمر الصحيح بلغة بايثون.

الإجابة: speed = 20: 2, drivetrain.set_drive_velocity(20, PERCENT): 1, drivetrain.drive_for(FORWARD, 300, MM): 4, for repeat_count in range(20):: 3, drivetrain.drive_for(REVERSE, 300, MM): 5

خطوات الحل:

  1. | المطلوب | الوصف | |---------|--------| | **كتابة رقم اللبنة البرمجية** | أمام الأمر الصحيح بلغة بايثون | | **المعطيات** | قائمة الأوامر المرقمة من 1 إلى 5 | | **الهدف** | مطابقة كل أمر مع رقم اللبنة البرمجية المناسبة |
  2. **المبدأ المستخدم:** مطابقة أوامر لغة بايثون مع تسلسل منطقي للبرمجة (تهيئة، تكرار، تنفيذ حركة).
  3. **الخطوات التفصيلية:** 1. **تحليل الأوامر:** - `speed = 20`: تهيئة متغير السرعة (يجب أن يأتي أولاً). - `drivetrain.set_drive_velocity(20, PERCENT)`: ضبط سرعة المحرك (يتبع التهيئة). - `for repeat_count in range(20)::`: حلقة تكرار (تأتي قبل الأوامر داخل الحلقة). - `drivetrain.drive_for(FORWARD, 300, MM)`: حركة للأمام (داخل الحلقة). - `drivetrain.drive_for(REVERSE, 300, MM)`: حركة للخلف (داخل الحلقة، بعد الحركة للأمام). 2. **ترتيب منطقي:** - **الخطوة 1:** `drivetrain.set_drive_velocity(20, PERCENT)` - ضبط السرعة أولاً. - **الخطوة 2:** `speed = 20` - تعيين قيمة للمتغير (قد يسبق أو يلي ضبط السرعة، لكن هنا يُعتبر تهيئة أساسية). - **الخطوة 3:** `for repeat_count in range(20)::` - بدء الحلقة التكرارية. - **الخطوة 4:** `drivetrain.drive_for(FORWARD, 300, MM)` - الأمر الأول داخل الحلقة. - **الخطوة 5:** `drivetrain.drive_for(REVERSE, 300, MM)` - الأمر الثاني داخل الحلقة. 3. **ملاحظة:** في البرمجة، عادةً نبدأ بتهيئة المتغيرات (`speed = 20`)، ثم ضبط الإعدادات (`set_drive_velocity`)، ثم الحلقات والأوامر التنفيذية. > **تنبيه:** الترتيب قد يختلف قليلاً حسب السياق، لكن التسلسل المنطقي هنا يعتمد على تهيئة الإعدادات أولاً، ثم التكرار، ثم تنفيذ الحركات داخل الحلقة.
  4. **الإجابة النهائية:** تم مطابقة كل أمر برمجي مع رقم اللبنة المناسب بناءً على التسلسل المنطقي للبرمجة، حيث: - `drivetrain.set_drive_velocity(20, PERCENT)`: اللبنة 1 (ضبط السرعة أولاً). - `speed = 20`: اللبنة 2 (تهيئة المتغير). - `for repeat_count in range(20)::`: اللبنة 3 (بدء الحلقة التكرارية). - `drivetrain.drive_for(FORWARD, 300, MM)`: اللبنة 4 (الأمر الأول داخل الحلقة). - `drivetrain.drive_for(REVERSE, 300, MM)`: اللبنة 5 (الأمر الثاني داخل الحلقة).

🎴 بطاقات تعليمية للمراجعة

عدد البطاقات: 5 بطاقة لهذه الصفحة

ما رقم اللبنة البرمجية التي تطابق الأمر `speed = 20` بلغة بايثون؟

  • أ) 1
  • ب) 2
  • ج) 3
  • د) 4

الإجابة الصحيحة: b

الإجابة: 2

الشرح: 1. الأمر `speed = 20` بلغة بايثون يقوم بتعيين القيمة 20 للمتغير `speed`. 2. اللبنة البرمجية التي تعبر عن هذا هي 'مجموعة speed إلى 20'. 3. هذه اللبنة تحمل الرقم 2.

تلميح: ركز على وظيفة الأمر (تعيين قيمة لمتغير) ومطابقتها مع اللبنة التي تؤدي نفس الوظيفة.

التصنيف: مسألة تدريبية | المستوى: سهل

ما رقم اللبنة البرمجية التي تطابق الأمر `for repeat_count in range(20):` بلغة بايثون؟

  • أ) 1
  • ب) 2
  • ج) 3
  • د) 4

الإجابة الصحيحة: c

الإجابة: 3

الشرح: 1. الأمر `for repeat_count in range(20):` ينشئ حلقة تكرارية لتنفيذ مجموعة من التعليمات 20 مرة. 2. اللبنة البرمجية التي تمثل حلقة التكرار هي 'تكرار 20'. 3. هذه اللبنة تحمل الرقم 3.

تلميح: تذكر أن الأمر 'for' يستخدم لإنشاء حلقات التكرار.

التصنيف: مسألة تدريبية | المستوى: متوسط

ما رقم اللبنة البرمجية التي تطابق الأمر `drivetrain.set_drive_velocity(20, PERCENT)` بلغة بايثون؟

  • أ) 1
  • ب) 2
  • ج) 3
  • د) 5

الإجابة الصحيحة: a

الإجابة: 1

الشرح: 1. الأمر `drivetrain.set_drive_velocity(20, PERCENT)` يحدد سرعة حركة الروبوت بنسبة مئوية. 2. اللبنة البرمجية التي تؤدي هذه الوظيفة هي 'اضبط سرعة القيادة إلى 20 %'. 3. هذه اللبنة تحمل الرقم 1.

تلميح: ابحث عن اللبنة التي تتحكم في سرعة القيادة أو الحركة بنسبة مئوية.

التصنيف: مسألة تدريبية | المستوى: متوسط

ما رقم اللبنة البرمجية التي تطابق الأمر `drivetrain.drive_for(FORWARD, 300, MM)` بلغة بايثون؟

  • أ) 1
  • ب) 3
  • ج) 4
  • د) 5

الإجابة الصحيحة: c

الإجابة: 4

الشرح: 1. الأمر `drivetrain.drive_for(FORWARD, 300, MM)` يوجه الروبوت للتحرك للأمام لمسافة 300 مليمتر. 2. اللبنة البرمجية التي تؤدي هذه الوظيفة هي 'تحرك إلى الأمام 300 عدد mm'. 3. هذه اللبنة تحمل الرقم 4.

تلميح: ابحث عن اللبنة التي تصف حركة الروبوت للأمام لمسافة محددة.

التصنيف: مسألة تدريبية | المستوى: سهل

ما رقم اللبنة البرمجية التي تطابق الأمر `drivetrain.drive_for(REVERSE, 300, MM)` بلغة بايثون؟

  • أ) 2
  • ب) 3
  • ج) 4
  • د) 5

الإجابة الصحيحة: d

الإجابة: 5

الشرح: 1. الأمر `drivetrain.drive_for(REVERSE, 300, MM)` يوجه الروبوت للتحرك للخلف لمسافة 300 مليمتر. 2. اللبنة البرمجية التي تؤدي هذه الوظيفة هي 'تحرك إلى الخلف 300 عدد mm'. 3. هذه اللبنة تحمل الرقم 5.

تلميح: ابحث عن اللبنة التي تصف حركة الروبوت للخلف لمسافة محددة.

التصنيف: مسألة تدريبية | المستوى: سهل