En
stringlengths 1
23.4k
| Ar
stringlengths 1
17.3k
| EN_word_count
int64 1
4.01k
| AR_word_count
int64 0
3.19k
|
---|---|---|---|
Once out of the cell, they will only have a few moments to crack the lock | هذا سيكون غامضا جدا، ولكن: "أدِر القرص 5 مراتب للأمام" سوف تكون جيدة | 16 | 13 |
for the outer prison door too before the guards catch them. | حالما أصبحوا خارج الزنزانة، سيكون لديهم لحظات قليلة لكسر القفل | 11 | 10 |
So what instructions will allow Hedge to efficiently open any door? | ولباب السجن الخارجي أيضاً قبل أن يلقي الحراس القبض عليهما. | 11 | 10 |
Pause now to figure it out for yourself. | إذاً ما هي التعليمات التي تسمح لهيدج أن يفتح أي باب بشكل فعال؟ | 8 | 13 |
Before we explain the solution, here’s a hint. | قم بالإيقاف الآن لتقوم بالاستنتاج بنفسك. | 8 | 6 |
A key programming concept that can help unlock the door is called a loop. | قبل أن نفسر الإجابة، إليك تلميحا. | 14 | 6 |
This can be one or more instructions that Hedge will iterate— or repeat— | مفهوم البرمجة المفتاحية يمكن أن يساعد على فتح الباب الذي اسمه الحلقة. | 13 | 12 |
a specified number of times, | هذا عبارة عن تعليمة واحدة أو أكثر سوف يقوم هيدج بإعادتها -أو تكرارها- | 5 | 13 |
like “jump up and down 100 times.” | مرات محددة، | 7 | 2 |
Or an instruction that Hedge will repeat until a condition is met, | مثل "اقفز للأعلى وللأسفل 100 مرة." | 12 | 6 |
such as “keep jumping up and down until it’s 7 o’clock.” | أو القيام بإعطاء هيدج تعليمة يكررها حتى يجد الشرط، | 11 | 9 |
Pause now to figure it out for yourself. | مثل "قم بالقفز للأعلى وللأسفل حتى تمام الساعة 7." | 8 | 9 |
The first thing that’s clear is that you need to find a way for Hedge | قم بالإيقاف الآن لتقوم بالاستنتاج بنفسك. | 15 | 6 |
to try every combination until one works. | الأمر الأول الواضح هو أنك تحتاج لطريقة من أجل هيدج | 7 | 10 |
What takes a little more effort is how exactly you do so. | أن يقوم بتجريب كل تركيبة حتى تعمل واحدة. | 12 | 8 |
One solution would be to instruct Hedge to try every combination in succession. | والذي يأخذ الجهد الأكبر هو كيفية القيام بذلك حرفيًا. | 13 | 9 |
Try 1 and check the light. | أحد الحلول أن تقوم بتوجيه هيدج أن يجرب كل تركيبة حتى ينجح. | 6 | 12 |
If it turns green, open the door, and if not, try 2. | جرب 1 ثم تحقق من الضوء. | 12 | 6 |
If that doesn’t work try 3. All the way up to 100. | إذا تحول لأخضر، افتح الباب، وإذا لم يكن فجرب 2 | 12 | 10 |
But it would be tedious to lay that out in its entirety. | إذا لم ينجح هذا جرب 3. هكذا حتى تصل إلى 100. | 12 | 11 |
Why write more than 100 lines of code, | ولكن سيكون ذلك مضجراً لوضع ذلك في مجملها. | 8 | 8 |
when you can do the same thing with just 3? | لماذا تكتب أكثر من 100 سطر من الترميز، | 10 | 8 |
This is where a loop comes in. | بينما يمكنك القيام بنفس العملية بـ 3 أسطر فقط؟ | 7 | 9 |
There are a few ways to go about this. | هنا يأتي دور الحلقة. | 9 | 4 |
The lock has 100 positions, | هنالك بعض الطرق للقيام بذلك. | 5 | 5 |
so Ethic could say “Check the dial’s color, then spin the dial forward once, | القفل لديه 100 وضع، | 14 | 4 |
for 100 repetitions. | لذلك إيثيك يمكنها القول "قم بالتحقق من لون القرص، ثم قم بتحريكه نحو الأمام مرة | 3 | 15 |
Remember where the dial turns green, then have Hedge set it back to that number.” | من أجل 100 تكرار. | 15 | 4 |
A loop like this, where you specify the number of times it repeats, | تذكر أين تحول القرص للون الأخضر، ثم دع هيدج أن يعود ويضبطه لذلك الرقم." | 13 | 14 |
is called a “for" loop. | الحلقة تقريبًا هكذا، أن تقوم بتحديد الرقم الخاص بالتكرارات، | 5 | 9 |
But an even more efficient loop | هذا يدعى حلقة "من أجل". | 6 | 5 |
would have Hedge spin the dial one position at a time until it turns green | ولكن حتى الحلقة الأكثر فعالية | 15 | 5 |
and as soon as that happens, have him stop and open the door. | سوف تجعل هيدج يقوم بتدوير القرص لموضع واحد وذلك عندما يتحول اللون لأخضر | 13 | 13 |
That way if the door unlocks on 1, | وحالما يحدث ذلك، سيتوقف ويقتح الباب. | 8 | 6 |
he doesn’t need to cycle through all the rest of the numbers. | في هذه الحالة إذا فتح عند 1، | 12 | 7 |
This is an “until” loop, | لا يضطر أن يقوم بالحلقة كاملة لبقية الأعداد جميعها. | 5 | 9 |
because it involves doing an action until a condition is met. | هذا هو حلقة "حتى" ، | 11 | 5 |
A similar, alternate approach would be to turn the dial while it’s still red, | لأنه يحتوي القيام بفعل حتى تحقيق الشرط. | 14 | 7 |
then stop. | وبشكل مماثل، الفرع البديل سوف يكون تدوير القرص حيث يبقى لونه أحمر، | 2 | 12 |
That’s called a “while” loop. | ثم توقف. | 5 | 2 |
Back to the adventure. | هذا يدعى حلقة "بينما" . | 4 | 5 |
Hedge loops through the combinations, and the cell opens at 41. | بالعودة للمغامرة. | 11 | 2 |
Ethic and Hedge wait until the perfect moment in the guards’ rotation | يقوم هيدج بالتنقل عبر التركيبات وثم الزنزانة تفتح عند الرقم 41. | 12 | 11 |
and make a break for it. | انتظر إيثيك وهيدج حتى اللحظة الموائمة عند استدارة الحارس | 6 | 9 |
Soon, Ethic faces a choice: hide inside a mysterious crystal, | وقاما بالهرب. | 10 | 2 |
or try to crack the outer door and make a run for it. | قريبًا، إيثيك واجهت اختيار الإختباء داخل كريستالة غامضة، | 13 | 8 |
Ethic chooses to run. | أو المحاولة لكسر الباب الخارجي والقيام بالهروب. | 4 | 7 |
The second door takes Hedge longer, requiring him to spin all the way to 93. | اختارت إيثيك الهروب. | 15 | 3 |
But he gets it open | الباب الثاني أخذ مع هيدج وقت أطول، حيث تطلب الأمر أن يقوم بإدارة القرص حتى 93. | 5 | 16 |
and takes the opportunity to explain why he’s rescued Ethic. | ولكن استطاع فتحه | 10 | 3 |
The world is in turmoil: | وقام بتفسير لماذا قام بإنقاذ إيثيك. | 5 | 6 |
robots have taken over, and only Ethic can set things right. | العالم بحالة فوضى: | 11 | 3 |
In order to do so, | لقد استولى الرجال الآليون على العالم، وإيثيك الوحيدة القادرة على تصويب الأمور. | 5 | 12 |
they’ll need to collect three powerful artifacts | وللقيام بذلك، | 7 | 2 |
that are being used for nefarious purposes across the land. | عليهم أن يقوموا بتجميع ثلاثة قطع أثرية قوية. | 10 | 8 |
Only then can Ethic return to the world machine— that giant crystal— | التي تستخد لأغراض شنيعة عبر الأرض. | 12 | 6 |
to set things right. | حينها فقط تستطيع إيثيك العودة لآلة الأرض -تلك الكرستالة الضخمة- | 4 | 10 |
Ethic may have escaped the prison… | للقيام بتصويب الأمور. | 6 | 3 |
but what has she gotten herself into? | ربما قامت إيثيك بالهروب من السجن... | 7 | 6 |
Hedge flies them both towards a frontier settlement | بعد هروب إيثيك من السجن | 8 | 5 |
in the shadow of the Bradbarrier, the great wall that encircles the nation. | حلق هيدج بها إلى مستوطنة حدودية | 13 | 6 |
All the settlers there will soon gather for the monthly feeding. | متاخمة لـ برادبريِر، السور العظيم الذي يطوق الشعب. | 11 | 8 |
The people of the wall spend their days gathering up works of art and literature, | سيجتمع جميع المستوطنين هناك قريباً للتغذية الشهرية. | 15 | 7 |
from all across the land. | يقضي أهل السور أيامهم في جمع الأعمال الفنية والأدبية، | 5 | 9 |
On feeding day, the furnace-bots arrive, ravenous. | من جميع أنحاء الأرض. | 7 | 4 |
If they eat, the lights stay on, and the food gets delivered. | في يوم التغذية، تصل الأفران الآلية، نهمة. | 12 | 7 |
If they starve, the people do too. | فإن أكلوا أضاؤوا، ويتم توصيل الطعام. | 7 | 6 |
Hedge’s fuel supply runs out just as he and Ethic reach the outskirts of town, | أما إذا تضوروا جوعاً، فسيجوع الناس أيضاً. | 15 | 7 |
and they come in for a crash landing. | تنفد الطاقة من هيدج في الوقت الذي يصل به هو وإيثيك إلى ضواحي المدينة، | 8 | 14 |
Luckily, everyone is too busy preparing for the feeding to notice. | ويقومان بهبوط اضطراري. | 11 | 3 |
Today’s feeding is where Ethic can find the leader | لحسن الحظ، الجميع مشغول جداً بالتحضير للتغذية فلم يلحظوهم. | 9 | 9 |
of an underground resistance movement. | يوم التغذية حيث يمكن لإيثيك أن يجد فيه قائد | 5 | 9 |
This person knows the location of the first of three powerful artifacts. | حركة المقاومة السرية. | 12 | 3 |
The problem is, Hedge and Ethic don’t know | هذا الشخص يعرف موقع أول قطعة من القطع الثلاثة الأثرية القوية. | 8 | 11 |
the resistance leader’s name or appearance. | المشكلة هي أنّ هيدج وإيثيك لا يعرفون | 6 | 7 |
But Hedge has gathered the following information: | اسم قائد المقاومة أو هيئته. | 7 | 5 |
The leader has green eyes. | لكن هيدج جمع المعلومات التالية: | 5 | 5 |
If the leader has red hair, their name has at least one consecutive double letter. | للقائد عينان خضروان. | 15 | 3 |
If the leader wear glasses, their name has exactly 2 vowels. | إذا كان شعر القائد أحمر، فسيحتوي اسمه على حرف واحد على الأقل مكرر ومتعاقب. | 11 | 14 |
Otherwise, their name has exactly 3 vowels. | إذا كان القائد يرتدي نظارة، فسيحتوي اسمه على حرفين صوتيين. | 7 | 10 |
There is exactly one person for whom these are all true. | بخلاف ذلك، فإن اسمه سيحتوي بالضبط على ثلاث أحرف صوتية. | 11 | 10 |
As a fugitive, | هناك شخص واحد بالضبط سينطبق عليه كل هذا. | 3 | 8 |
Ethic can’t sneak into the crowd without drawing attention to herself. | كطريدة، | 11 | 1 |
But she can give instructions to Hedge. | لا يمكن لإيثيك التسلل إلى الحشد دون لفت الانتباه إلى نفسها. | 7 | 11 |
And one tool she has is what programmers call a conditional. | لكنها يمكن أن تعطي تعليمات لهيدج. | 11 | 6 |
That’s a statement of the form “If A, then B.” | وأحد الأدوات التي لديها هي ما يسميه المبرمجون بالأمر المشروط. | 10 | 10 |
Flowcharts are great illustrations of how those work. | هذا بيان عن النموذج "إذا كانت الإجابة A، فحينئذٍ B." | 8 | 10 |
This conditional translates to: if A is true, carry out instruction B. | إن خرائط سير المعلومات هي رسوم توضيحية رائعة لكيفية عمل النموذج. | 12 | 11 |
There are also conditionals that account for different possibilities. | يترجم هذا الأمر المشروط إلى: إذا كان A صحيحاً، فقم بتنفيذ التعليمات B. | 9 | 13 |
This says, “If A is true, perform instruction B. | هناك أيضا الأمور المشروطة التي تمثل الاحتمالات المختلفة. | 9 | 8 |
Otherwise, carry out instruction C.” | ومؤدى ذلك أنه، "إذا كان A صحيحاً، فقم بتنفيذ التعليمات B. | 5 | 11 |
So what instructions does she give Hedge so he can find the resistance leader? | وإذا لم تكن، فقم بتنفيذ التعليمات C." | 14 | 7 |
Pause now to figure it out for yourself. | فما هي التعليمات التي تعطيها لهيدج حتى يتمكن من العثور على قائد المقاومة؟ | 8 | 13 |
With a problem like this, it can help to simplify first. | توقف الآن لتكتشف ذلك بنفسك! | 11 | 5 |
What if Hedge just has to examine this one person? | مع مثل هذه المشكلة، يمكن أن يساعد تبسيط الأمر أولاً. | 10 | 10 |
What information does he need to collect about her? | ماذا لو كان على هيدج فحص هذا الشخص؟ | 9 | 8 |
He might ask, “Does she have green eyes?” | ما هي المعلومات التي يحتاج أن يجمعها عنها؟ | 8 | 8 |
What other questions should Hedge ask to find the resistance leader, | قد يسأل، "هل لديها عينان خضروان؟" | 11 | 6 |
and how can he track those answers? | ما هي الأسئلة الأخرى التي يجب على هيدج طرحها للعثور على قائد المقاومة، | 7 | 13 |
Pause now to figure it out for yourself. | وكيف يمكنه تتبع تلك الإجابات؟ | 8 | 5 |
Subsets and Splits