📋 المحتوى المنظم
📖 محتوى تعليمي مفصّل
السؤال الثامن
نوع: محتوى تعليمي
ما الذي سيعرض على شاشة LED عند تشغيل المقطع البرمجي التالي؟ اكتب الإجابة الصحيحة.
نوع: محتوى تعليمي
x = 12
y = 8
def on_button_pressed_a():
basic.show_number(x+y)
input.on_button_pressed(Button.A, on_button_pressed_a)
def on_button_pressed_b():
basic.show_number(18+x*y)
input.on_button_pressed(Button.B, on_button_pressed_b)
def on_button_pressed_ab():
basic.show_number((x/y)**2)
input.on_button_pressed(Button.AB, on_button_pressed_ab)
نوع: محتوى تعليمي
A
B
A+B
السؤال التاسع
نوع: محتوى تعليمي
هل يمكنك ملء شبكة المايكروبيت LED بأزواج الإحداثيات ؟
🔍 عناصر مرئية
A label 'A' with a horizontal arrow pointing to an empty input box.
A label 'B' with a horizontal arrow pointing to an empty input box.
A label 'A+B' with a horizontal arrow pointing to an empty input box.
A Micro:bit device with a 5x5 LED grid. The grid has coordinate labels: (0,0) at the top-left, (1,4) at the bottom-left, and (4,3) at the bottom-right. Two physical buttons labeled 'A' and 'B' are visible on the left and right sides respectively. Pins labeled 0, 1, 2, 3V, and GND are at the bottom.
📄 النص الكامل للصفحة
--- SECTION: السؤال الثامن ---
ما الذي سيعرض على شاشة LED عند تشغيل المقطع البرمجي التالي؟ اكتب الإجابة الصحيحة.
x = 12
y = 8
def on_button_pressed_a():
basic.show_number(x+y)
input.on_button_pressed(Button.A, on_button_pressed_a)
def on_button_pressed_b():
basic.show_number(18+x*y)
input.on_button_pressed(Button.B, on_button_pressed_b)
def on_button_pressed_ab():
basic.show_number((x/y)**2)
input.on_button_pressed(Button.AB, on_button_pressed_ab)
A
B
A+B
--- SECTION: السؤال التاسع ---
هل يمكنك ملء شبكة المايكروبيت LED بأزواج الإحداثيات ؟
--- VISUAL CONTEXT ---
**DIAGRAM**: Untitled
Description: A label 'A' with a horizontal arrow pointing to an empty input box.
Context: Represents input for button A in the Micro:bit programming context.
**DIAGRAM**: Untitled
Description: A label 'B' with a horizontal arrow pointing to an empty input box.
Context: Represents input for button B in the Micro:bit programming context.
**DIAGRAM**: Untitled
Description: A label 'A+B' with a horizontal arrow pointing to an empty input box.
Context: Represents input for combined buttons A and B in the Micro:bit programming context.
**DIAGRAM**: Untitled
Description: A Micro:bit device with a 5x5 LED grid. The grid has coordinate labels: (0,0) at the top-left, (1,4) at the bottom-left, and (4,3) at the bottom-right. Two physical buttons labeled 'A' and 'B' are visible on the left and right sides respectively. Pins labeled 0, 1, 2, 3V, and GND are at the bottom.
Table Structure:
Headers: Row/Column | 0 | 1 | 2 | 3 | 4
Rows:
Row 1: 0 | LED (0,0) | LED (0,1) | LED (0,2) | LED (0,3) | LED (0,4)
Row 2: 1 | LED (1,0) | LED (1,1) | LED (1,2) | LED (1,3) | LED (1,4)
Row 3: 2 | LED (2,0) | LED (2,1) | LED (2,2) | LED (2,3) | LED (2,4)
Row 4: 3 | LED (3,0) | LED (3,1) | LED (3,2) | LED (3,3) | LED (3,4)
Row 5: 4 | LED (4,0) | LED (4,1) | LED (4,2) | LED (4,3) | LED (4,4)
Calculation needed: The grid can be used to display patterns or text by turning on/off individual LEDs at specified coordinates.
X-axis: Column index (0 to 4)
Y-axis: Row index (0 to 4)
Data: The grid represents a 5x5 matrix of LEDs, where each LED can be addressed by its (x, y) coordinates.
Key Values: LED grid coordinates range from (0,0) to (4,4).
Context: Illustrates the coordinate system used for the Micro:bit's LED display, essential for programming visual outputs.
🎴 بطاقات تعليمية للمراجعة
عدد البطاقات: 3 بطاقة لهذه الصفحة
في برمجة المايكروبيت، إذا كان لدينا المتغيران x=12 و y=8، فما الرقم الذي سيُعرض عند الضغط على الزرين A و B معاً (AB)؟
الإجابة الصحيحة: c
الإجابة: 2.25
الشرح: 1. عند الضغط على الزرين AB، يتم تنفيذ الأمر: (x/y)**2.
2. x/y = 12/8 = 1.5.
3. (1.5)**2 = 1.5 × 1.5 = 2.25.
4. النتيجة النهائية المعروضة هي 2.25.
تلميح: تذكر ترتيب العمليات الحسابية: القسمة أولاً، ثم رفع الناتج للأس 2.
التصنيف: سؤال اختبار | المستوى: متوسط
في برمجة المايكروبيت، إذا كان لدينا المتغيران x=12 و y=8، فما الرقم الذي سيُعرض عند الضغط على الزر B؟
الإجابة الصحيحة: b
الإجابة: 114
الشرح: 1. عند الضغط على الزر B، يتم تنفيذ الأمر: 18 + x * y.
2. x * y = 12 * 8 = 96.
3. 18 + 96 = 114.
4. النتيجة النهائية المعروضة هي 114.
تلميح: تطبق عملية الضرب قبل عملية الجمع وفقاً لأولوية العمليات.
التصنيف: سؤال اختبار | المستوى: سهل
ما نطاق الإحداثيات (x, y) المستخدم لتمثيل المواقع على شبكة LED الخاصة بلوحة المايكروبيت القياسية؟
- أ) من (1,1) إلى (5,5)
- ب) من (0,0) إلى (4,4)
- ج) من (0,0) إلى (5,5)
- د) من (1,1) إلى (4,4)
الإجابة الصحيحة: b
الإجابة: من (0,0) إلى (4,4)
الشرح: 1. شبكة LED في المايكروبيت القياسي هي مصفوفة 5×5.
2. يتم ترقيم الصفوف (المحور y) والأعمدة (المحور x) بدءاً من الصفر.
3. لذلك، قيم x و y الصحيحة الممكنة هي من 0 إلى 4.
4. يمكن تمثيل أي نقطة بزوج إحداثيات ضمن هذا النطاق.
تلميح: شاشة LED الخاصة بالمايكروبيت تتكون من 5 صفوف و5 أعمدة.
التصنيف: مفهوم جوهري | المستوى: سهل