Lesson ٣: Programming Basics ٢
فيديو الشرح
الفيديو قيد الإنتاج، وسيظهر هنا فور اعتماده.
ماذا ستتعلم؟
- I identify the main ideas of the lesson
- I extract the key information
- I apply what I learned
- I connect cause and effect
- I review my answer
اختبر استعدادك أولًا
الشرح خطوة بخطوة
Level ١: We explore together
Lesson topic: Programming Basics ٢. In the second programming lesson we meet loops, which repeat work without writing it many times.
The story: A loop repeats a group of steps while a condition is true or for a known number of times. A for loop is used when we know how many times we want to repeat, like printing five lines. A while loop repeats as long as a condition stays true, like asking for a password until it is correct. We must make sure a loop can end, otherwise the program runs forever and freezes. In this lesson we learn for loops, while loops, and how to avoid endless loops.
Level ٢: I review the idea
We review the key points of the lesson: What is a loop? -> A structure that repeats a group of steps; When do we use a for loop? -> When we know how many repetitions we want.
We read each sentence again and mark its keyword.
Level ٣: I use what I learned
We apply what we learned by answering these questions: What is a loop? -> A structure that repeats a group of steps; When do we use a for loop? -> When we know how many repetitions we want; When do we use a while loop? -> When we repeat while a condition is true.
We explain why we rejected each wrong option before choosing the answer.
Level ٤: Games and activities
We take turns with a partner: one of us asks "What is a loop?" and the other answers, then we switch roles.
We write a card for each idea of the lesson and order them as they appear in the explanation.
We summarize the lesson in three sentences in our own words without copying.
Level ٥: Mastery and review
I can: identify the main ideas of the lesson; extract the key information; apply what I learned.
We review after one day, then after three days. A short five-minute review is better than one long session.
Optional challenge: I write two new questions of my own about the lesson and ask a partner to answer them.
أخطاء شائعة وتصحيحها
- We answer "Give an example of a for loop in words." with "Print once only": Correct: Print the numbers from ١ to ٥
- We answer "Give an example of a while loop in words." with "Print ١ to ٥ exactly once": Correct: Keep asking for the password until it is correct
- We answer "What is an endless (infinite) loop?" with "A loop that ends quickly": Correct: A loop whose stopping condition never becomes false
- We answer "How do we stop an infinite loop?" with "Wait forever": Correct: Make sure the condition changes so it can become false
أمثلة محلولة متدرجة
What is a loop?
- نقرأ السؤال معًا بهدوء.
- Repeat steps.
Which loop fits: print the numbers ١ to ١٠٠?
- نقرأ السؤال معًا بهدوء.
- Known count.
Which loop fits: keep asking until the answer is correct?
- نقرأ السؤال معًا بهدوء.
- Unknown count, condition.
Write in words a for loop that prints your name five times.
- نقرأ السؤال معًا بهدوء.
- Count to five.
A while loop says: while hungry, eat. When does it stop?
- نقرأ السؤال معًا بهدوء.
- When the condition breaks.
Find the bug: counter = ١; while counter < ٥: print(counter). How do we fix it?
- نقرأ السؤال معًا بهدوء.
- Something must change.
Compare for and while loops in one sentence each.
- نقرأ السؤال معًا بهدوء.
- Known count versus condition.
Design in words a loop that adds the numbers from ١ to ١٠ and prints the total.
- نقرأ السؤال معًا بهدوء.
- A total variable plus a counter.
Your friend says: "A while loop always runs exactly ten times." Is this correct?
- نقرأ السؤال معًا بهدوء.
- What controls repetition?
الخريطة الذهنية
إنفوجرافيك: Lesson map: words of the day
We review the questions after one day, then after three days
تدريبات متنوعة مع الإجابات والتفسير
اكتب الإجابة أو اختر ثم اضغط. بعد كل سؤال يظهر الحل مع التفسير.
A) I choose the answer
B) I practice and answer
C) I review and play
ملخص صوتي وقارئ الدرس
قارئ تجريبي يعمل بصوت جهازك (مجاني). ليس تسجيلًا احترافيًا، وجودة الصوت العربي تختلف من جهاز لآخر. التسجيل الصوتي الاحترافي لم يُنتج بعد.
Lesson topic: Programming Basics ٢. In the second programming lesson we meet loops, which repeat work without writing it many times.
We review the key points of the lesson: What is a loop? -> A structure that repeats a group of steps; When do we use a for loop? -> When we know how many repetitions we want.
We apply what we learned by answering these questions: What is a loop? -> A structure that repeats a group of steps; When do we use a for loop? -> When we know how many repetitions we want; When do we use a while loop? -> When we repeat while a condition is true.
مسار المراجعة للامتحان
- Day one (١٠ minutes): We read levels ١ to ٣ together, then solve exercises (A).
- Day two (١٠ minutes): We play the level ٤ games and solve exercises (B).
- Day three (١٠ minutes): Exercises (C), then the Level One test.
- Before the school exam: We repeat the Level Three test and look at the common mistakes.
اختبارات بثلاثة مستويات
Level One Test: The Basics
٨ أسئلة. اجب ثم اضغط «أنهِ الاختبار» لترى درجتك.
Level Two Test: Application
١٠ أسئلة. اجب ثم اضغط «أنهِ الاختبار» لترى درجتك.
Level Three Test: The Challenge
٨ أسئلة. اجب ثم اضغط «أنهِ الاختبار» لترى درجتك.
المصادر والحقوق
- لا يوجد فيديو أو تسجيل صوتي احترافي بعد.
- Programming and Artificial Intelligence book (English edition), First Secondary Grade, Second Term, Egyptian Ministry of Education and Technical Education: the book was used to determine lesson scope, order and titles only (no text or exercises copied).
- Scope of this term from the official MOE Term ٢ curriculum distribution (February ٢٠٢٦): Unit ٨ Networks (lessons ٨-١ to ٨-٣), Unit ٩ Databases (٩-١, ٩-٢), Unit ١٢ Programming (١٢-١ to ١٢-٣) and Unit ١٣ Generative AI (١٣-١ to ١٣-٧); the English edition mirrors the Arabic book structure. All explanations, examples, exercises and tests were originally authored in English for this edition; they are not a translation of the Arabic text. Review is automated, not by a teacher.
- All explanations, examples, exercises and tests on this page are authored by I BOOK PRESS. Automated and author review only, without teacher review; no video or professional audio yet.