Skip to content · ⁨الانتقال إلى المحتوى⁩
Subjects · ⁨المواد⁩

AP Computer Science Principles · ⁨AP مبادئ علوم الحاسوب⁩

Tips

مبادئ علم الحاسوب AP هو course واسع النطاق: البيانات وتمثيلها، الخوارزميات والتجريد، البرمجة، الإنترنت، وتأثير الحوسبة على المجتمع. يُكتب الكود بأي لغة، ويستخدم الامتحان كوداً وهمياً محايداً للغة، لذا فإن الأفكار أهم من القواعد النحوية.

يتكون التقييم من نصفين. مهمة الأداء الإنشائية هي برنامج تبنيه وتوثقه خلال وقت الصف؛ أما امتحان نهاية Course فهو اختيار من متعدد.

تفقد الإجابات المكتوبة حول برنامجك الخاص هي المكان الذي تفقد فيه الدرجات — حيث يُطلب منك شرح خوارزمية كتبتها وتبرير تجريد اخترته، بدقة، بكلماتك الخاصة.

تغطي الملاحظات الأفكار الرئيسية من البيانات إلى التأثير، مع أمثلة برمجية يمكنك تشغيلها هنا. تحتوي المكتبة على أسئلة الامتحان النموذجية، وهناك ملاحظات حول مهمة الأداء الإنشائية، والتي يتم تقييمها بناءً على برنامجك الخاص والإجابات المكتوبة بدلاً من الامتحان وحده.

  • 1

    Creative Development · ⁨التطوير الإبداعي⁩

    Watch lesson · ⁨شاهد الدرس⁩
    1.1

    Collaboration · ⁨التعاون⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (CRD-1): Incorporating multiple perspectives through collaboration improves computing innovations as they are developed.

    Learning Objective CRD-1.A: Explain how computing innovations are improved through collaboration. [Skill 1.C]

    • CRD-1.A.1 A computing innovation includes a program as an integral part of its function.
    • CRD-1.A.2 A computing innovation can be physical (e.g., self-driving car), nonphysical computing software (e.g., picture editing software), or a nonphysical computing concept (e.g., e-commerce).
    • CRD-1.A.3 Effective collaboration produces a computing innovation that reflects the diversity of talents and perspectives of those who designed it.
    • CRD-1.A.4 Collaboration that includes diverse perspectives helps avoid bias in the development of computing innovations.
    • CRD-1.A.5 Consultation and communication with users are important aspects of the development of computing innovations.
    • CRD-1.A.6 Information gathered from potential users can be used to understand the purpose of a program from diverse perspectives and to develop a program that fully incorporates these perspectives.

    Learning Objective CRD-1.B: Explain how computing innovations are developed by groups of people. [Skill 1.C]

    • CRD-1.B.1 Online tools support collaboration by allowing programmers to share and provide feedback on ideas and documents.
    • CRD-1.B.2 Common models such as pair programming exist to facilitate collaboration.

    Learning Objective CRD-1.C: Demonstrate effective interpersonal skills during collaboration. [Skill 1.C]

    • CRD-1.C.1 Effective collaborative teams practice interpersonal skills, including but not limited to:
      • communication
      • consensus building
      • conflict resolution
      • negotiation
    العربية

    فهم دائم (CRD-1): دمج وجهات نظر متعددة من خلال التعاون يحسن الابتكارات الحاسوبية أثناء تطويرها.

    هدف التعلم CRD-1.A: اشرح كيف تتحسن الابتكارات الحاسوبية من خلال التعاون. [مهارة 1.C]

    • CRD-1.A.1 تتضمن الابتكار الحاسوبي برنامجًا كجزء لا يتجزأ من وظيفته.
    • CRD-1.A.2 يمكن أن يكون الابتكار الحاسوبي ماديًا (مثل سيارة ذاتية القيادة)، أو برمجيات حاسوبية غير مادية (مثل برامج تعديل الصور)، أو مفهوم حاسوبي غير مادي (مثل التجارة الإلكترونية).
    • CRD-1.A.3 ينتج التعاون الفعال ابتكارًا حاسوبيًا يعكس تنوع المهارات ووجهات النظر لأولئك الذين صمموه.
    • CRD-1.A.4 يساعد التعاون الذي يتضمن وجهات نظر متنوعة في تجنب التحيز في تطوير الابتكارات الحاسوبية.
    • CRD-1.A.5 الاستشارة والتواصل مع المستخدمين جوانب مهمة من تطوير الابتكارات الحاسوبية.
    • CRD-1.A.6 يمكن استخدام المعلومات المستخرجة من المستخدمين المحتملين لفهم غرض البرنامج من وجهات نظر متنوعة وتطوير برنامج يدمج هذه الوجهات نظر بشكل كامل.

    هدف التعلم CRD-1.B: اشرح كيف يتم تطوير الابتكارات الحاسوبية من قبل مجموعات من الناس. [مهارة 1.C]

    • CRD-1.B.1 تدعم الأدوات عبر الإنترنت التعاون من خلال السماح للمبرزين بمشاركة الأفكار والمستندات وتقديم التعليقات عليها.
    • CRD-1.B.2 توجد نماذج شائعة مثل البرمجة الزوجية لسهولة التعاون.

    هدف التعلم CRD-1.C: إظهار مهارات تواصل فعالة أثناء التعاون. [مهارة 1.C]

    • CRD-1.C.1 فرق التعاون الفعالة تطبق مهارات التواصل بين الأشخاص، بما في ذلك على سبيل المثال لا الحصر:
      • التواصل
      • بناء الإجماع
      • حل النزاعات
      • التفاوض

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Computing is a collaborative 协作 activity. Working in a team brings more perspectives, catches more errors, and produces better programs than working alone. Good collaboration uses consensus building, clear communication, and each member's strengths. Pair programming 结对编程 – two people at one computer, one typing and one reviewing – is a common practice. On the exam, you should be able to explain how collaboration improved a program (more ideas, fewer bugs, wider testing).

    العربية
    لغز جigsaw قيد الإنشاء: التعاون والتصميم المعياري يكملان الحل معاً
    لغز جigsaw قيد الإنشاء: التعاون والتصميم المعياري يكملان الحل معاً

    علم الحاسوب نشاط تعاوني. العمل في فريق يجلب وجهات نظر أكثر، يكشف أخطاء أكثر، وينتج برامج أفضل من العمل الفردي. التعاون الجيد يستخدم بناء الإجماع، التواصل الواضح، وقدرات كل عضو. البرمجة الزوجية – شخصان عند جهاز كمبيوتر واحد، أحدهما يكتب والآخر يراجع – ممارسة شائعة. في الامتحان، يجب أن تكون قادراً على شرح كيف حسّن التعاون البرنامج (أفكار أكثر، أخطاء أقل، اختبار أوسع).

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    collaborative/kəˈlæbrətɪv/ تعاوني
    Pair programming/peə ˈprəʊɡræmɪŋ/ البرمجة الزوجية
    input/ˈɪnpʊt/ مدخلات
    output/ˈaʊtpʊt/ نقرة فأرة تُبدأ عملاً هي مثال على
    iterative/ˈɪtərətɪv/ تكرارية
    decomposition/ˌdiːkɒmpəˈzɪʃn/ تحلل
    Comments/ˈkɒments/ التعليقات
    surveys/ˈsɜːveɪz/ استطلاعات
    diagrams representing the layout of the user interface مخططات تمثل تخطيط واجهة المستخدم
    event/ɪˈvent/ مخرجات
    event handler/ɪˈvent ˈhændlə/ معالج الأحداث
    debugging/ˈdiːbʌɡɪŋ/ تصحيح الأخطاء
    syntax error/ˈsɪntæks ˈerə/ خطأ صياغة
    runtime error/ˈrʌntaɪm ˈerə/ خطأ وقت التشغيل
    logic error/ˈlɒdʒɪk ˈerə/ خطأ منطق
    1.2

    Program Function and Purpose · ⁨وظيفة البرنامج والغرض منه⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (CRD-2): Developers create and innovate using an iterative design process that is user-focused, that incorporates implementation/feedback cycles, and that leaves ample room for experimentation and risk-taking.

    Learning Objective CRD-2.A: Describe the purpose of a computing innovation. [Skill 1.A]

    • CRD-2.A.1 The purpose of computing innovations is to solve problems or to pursue interests through creative expression.
    • CRD-2.A.2 An understanding of the purpose of a computing innovation provides developers with an improved ability to develop that computing innovation.

    Learning Objective CRD-2.B: Explain how a program or code segment functions. [Skill 4.A]

    • CRD-2.B.1 A program is a collection of program statements that performs a specific task when run by a computer. A program is often referred to as software.
    • CRD-2.B.2 A code segment is a collection of program statements that is part of a program.
    • CRD-2.B.3 A program needs to work for a variety of inputs and situations.
    • CRD-2.B.4 The behavior of a program is how a program functions during execution and is often described by how a user interacts with it.
    • CRD-2.B.5 A program can be described broadly by what it does, or in more detail by both what the program does and how the program statements accomplish this function.

    Learning Objective CRD-2.C: Identify input(s) to a program. [Skill 3.A]

    • CRD-2.C.1 Program inputs are data sent to a computer for processing by a program. Input can come in a variety of forms, such as tactile, audio, visual, or text.
    • CRD-2.C.2 An event is associated with an action and supplies input data to a program.
    • CRD-2.C.3 Events can be generated when a key is pressed, a mouse is clicked, a program is started, or any other defined action occurs that affects the flow of execution.
    • CRD-2.C.4 Inputs usually affect the output produced by a program.
    • CRD-2.C.5 In event-driven programming, program statements are executed when triggered rather than through the sequential flow of control.
    • CRD-2.C.6 Input can come from a user or other programs.

    Learning Objective CRD-2.D: Identify output(s) produced by a program. [Skill 3.A]

    • CRD-2.D.1 Program outputs are any data sent from a program to a device. Program output can come in a variety of forms, such as tactile, audio, visual, or text.
    • CRD-2.D.2 Program output is usually based on a program's input or prior state (e.g., internal values).
    العربية

    فهم دائم (CRD-2): المطورون يبتكرون ويبتكرون باستخدام عملية تصميم تكرارية تركز على المستخدم، وتدمج دورات التنفيذ/التغذية الراجعة، وتترك مجالًا واسعًا للتجربة والمخاطرة.

    هدف التعلم CRD-2.A: صف غرض الابتكار الحاسوبي. [مهارة 1.A]

    • CRD-2.A.1 غرض الابتكارات الحاسوبية هو حل المشكلات أو السعي وراء الاهتمامات من خلال التعبير الإبداعي.
    • CRD-2.A.2 فهم غرض الابتكار الحاسوبي يوفر للمطورين قدرة محسنة على تطوير هذا الابتكار الحاسوبي.

    هدف التعلم CRD-2.B: اشرح كيف يعمل برنامج أو مقطع كود. [مهارة 4.A]

    • CRD-2.B.1 البرنامج هو مجموعة من عبارات البرنامج تنفذ مهمة محددة عند تشغيلها بواسطة جهاز كمبيوتر. غالبًا ما يُشار إلى البرنامج بـ البرمجيات.
    • CRD-2.B.2 مقطع الكود هو مجموعة من عبارات البرنامج تكون جزءًا من برنامج.
    • CRD-2.B.3 يحتاج البرنامج إلى العمل لمجموعة متنوعة من المدخلات والمواقف.
    • CRD-2.B.4 سلوك البرنامج هو كيفية عمل البرنامج أثناء التنفيذ وغالبًا ما يُوصف بكيفية تفاعل المستخدم معه.
    • CRD-2.B.5 يمكن وصف البرنامج بشكل عام بما يقوم به، أو بتفصيل أكبر من خلال ما يقوم به البرنامج وكيفية تحقيق جمل البرنامج لهذه الوظيفة.

    هدف التعلم CRD-2.C: تحديد المدخلات(ات) للبرنامج. [مهارة 3.A]

    • CRD-2.C.1 مدخلات البرنامج هي بيانات تُرسل إلى جهاز الحاسوب لمعالجتها بواسطة برنامج. قد تأتي المدخلات بأشكال متنوعة، مثل اللمس، والصوت، والمرئي، أو النص.
    • CRD-2.C.2 يرتبط حدث بإجراء ويوفر بيانات مدخلات للبرنامج.
    • CRD-2.C.3 يمكن توليد الأحداث عند الضغط على مفتاح، أو النقر بالماوس، أو بدء برنامج، أو حدوث أي إجراء آخر محدد يؤثر على تدفق التنفيذ.
    • CRD-2.C.4 عادةً ما تؤثر المدخلات على المخرجات التي ينتجها البرنامج.
    • CRD-2.C.5 في البرمجة القائمة على الأحداث، يتم تنفيذ جمل البرنامج عند التفعيل بدلاً من خلال التدفق المتسلسل للتحكم.
    • CRD-2.C.6 يمكن أن تأتي المدخلات من مستخدم أو برامج أخرى.

    هدف التعلم CRD-2.D: تحديد المخرجات(ات) التي ينتجها البرنامج. [مهارة 3.A]

    • CRD-2.D.1 مخرجات البرنامج هي أي بيانات تُرسل من برنامج إلى جهاز. يمكن أن تأتي مخرجات البرنامج بأشكال متنوعة، مثل اللمس، والصوت، والمرئي، أو النص.
    • CRD-2.D.2 عادةً ما تعتمد مخرجات البرنامج على مدخلات البرنامج أو حالته السابقة (مثل القيم الداخلية).

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Every program is written for a purpose – it solves a problem or pursues an interest. A program takes input 输入, processes it, and produces output 输出. Inputs can come from a user, a device, a file, or another program; outputs can be visual, audible, textual, or a signal to a device. Being able to state a program's purpose, and describe its inputs and outputs clearly, is a core skill (and part of the Create performance task).

    العربية

    كل برنامج كُتب لغرض ما – يحل مشكلة أو يطبع اهتماماً. يأخذ البرنامج مدخلات، يعالجها، وينتج مخرجات. المدخلات يمكن أن تأتي من مستخدم، جهاز، ملف، أو برنامج آخر؛ المخرجات يمكن أن تكون مرئية، سمعية، نصية، أو إشارة لجهاز. القدرة على صياغة غرض البرنامج ووصف مدخلاته ومخرجاته بوضوح هي مهارة جوهرية (وتجزء من مهمة الأداء Create).

    كل برنامج يتحلل إلى مدخلات، معالجة، ومخرجات
    كل برنامج يتحلل إلى مدخلات، معالجة، ومخرجات
    كل برنامج يتبع نموذج المدخلات-المعالجة-المخرجات
    كل برنامج يتبع نموذج المدخلات-المعالجة-المخرجات
    Explore · ⁨استكشف⁩

    Explore the input → processing → output model · ⁨استكشف نموذج الإدخال → المعالجة → المخرج⁩

    Step through the IPO model. Every program takes some input, performs processing on it by following its instructions, then produces output — trace one weather-app example along the pipeline. · ⁨مرّ بـ نموذج IPO. كل برنامج يأخذ بعض المدخلات، يقوم معالجة عليها بتوجيه تعليماته، ثم ينتج مخرجات — تتبع مثال تطبيق الطقس عبر هذا المسار.⁩

    1.3

    Program Design and Development · ⁨تصميم وتطوير البرامج⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (CRD-2): Developers create and innovate using an iterative design process that is user-focused, that incorporates implementation/feedback cycles, and that leaves ample room for experimentation and risk-taking.

    Learning Objective CRD-2.E: Develop a program using a development process. [Skill 1.B]

    • CRD-2.E.1 A development process can be ordered and intentional, or exploratory in nature.
    • CRD-2.E.2 There are multiple development processes. The following phases are commonly used when developing a program:
      • investigating and reflecting
      • designing
      • prototyping
      • testing
    • CRD-2.E.3 A development process that is iterative requires refinement and revision based on feedback, testing, or reflection throughout the process. This may require revisiting earlier phases of the process.
    • CRD-2.E.4 A development process that is incremental is one that breaks the problem into smaller pieces and makes sure each piece works before adding it to the whole.

    Learning Objective CRD-2.F: Design a program and its user interface. [Skill 1.B]

    • CRD-2.F.1 The design of a program incorporates investigation to determine its requirements.
    • CRD-2.F.2 Investigation in a development process is useful for understanding and identifying the program constraints, as well as the concerns and interests of the people who will use the program.
    • CRD-2.F.3 Some ways investigation can be performed are as follows:
      • collecting data through surveys
      • user testing
      • interviews
      • direct observations
    • CRD-2.F.4 Program requirements describe how a program functions and may include a description of user interactions that a program must provide.
    • CRD-2.F.5 A program's specification defines the requirements for the program.
    • CRD-2.F.6 In a development process, the design phase outlines how to accomplish a given program specification.
    • CRD-2.F.7 The design phase of a program may include:
      • brainstorming
      • planning and storyboarding
      • organizing the program into modules and functional components
      • creation of diagrams that represent the layouts of the user interface
      • development of a testing strategy for the program

    Learning Objective CRD-2.G: Describe the purpose of a code segment or program by writing documentation. [Skill 4.A]

    • CRD-2.G.1 Program documentation is a written description of the function of a code segment, event, procedure, or program and how it was developed.
    • CRD-2.G.2 Comments are a form of program documentation written into the program to be read by people and do not affect how a program runs.
    • CRD-2.G.3 Programmers should document a program throughout its development.
    • CRD-2.G.4 Program documentation helps in developing and maintaining correct programs when working individually or in collaborative programming environments.
    • CRD-2.G.5 Not all programming environments support comments, so other methods of documentation may be required.

    Learning Objective CRD-2.H: Acknowledge code segments used from other sources. [Skill 1.C]

    • CRD-2.H.1 It is important to acknowledge any code segments that were developed collaboratively or by another source.
    • CRD-2.H.2 Acknowledgement of a code segment(s) written by someone else and used in a program can be in the program documentation. The acknowledgement should include the origin or original author's name.
    العربية

    فهم دائم (CRD-2): المطورون يبتكرون ويبتكرون باستخدام عملية تصميم تكرارية تركز على المستخدم، وتدمج دورات التنفيذ/التغذية الراجعة، وتترك مجالًا واسعًا للتجربة والمخاطرة.

    هدف التعلم CRD-2.E: تطوير برنامج باستخدام عملية تطوير. [مهارة 1.B]

    • CRD-2.E.1 يمكن أن تكون عملية التطوير مرتبة ومقصودة، أو استكشافية بطبيعتها.
    • CRD-2.E.2 توجد عمليات تطوير متعددة. المراحل التالية شائعة الاستخدام عند تطوير برنامج:
      • الاستكشاف والتأمل
      • التصميم
      • بناء النموذج الأولي
      • الاختبار
    • CRD-2.E.3 تتطلب عملية التطوير التكراري التحسين والمراجعة بناءً على التغذية الراجعة، أو الاختبار، أو التأمل طوال العملية. قد يتطلب ذلك العودة إلى مراحل سابقة من العملية.
    • CRD-2.E.4 عملية التطوير التدريجي هي التي تقسم المشكلة إلى أجزاء أصغر وتتأكد من عمل كل جزء قبل إضافته إلى الكل.

    هدف التعلم CRD-2.F: تصميم برنامج وواجهة المستخدم الخاصة به. [مهارة 1.B]

    • CRD-2.F.1 يتضمن تصميم البرنامج استكشافاً لتحديد متطلباته.
    • CRD-2.F.2 يكون الاستكشاف في عملية التطوير مفيداً لفهم وتحديد قيود البرنامج، بالإضافة إلى اهتمامات ومشاعر الأشخاص الذين سيستخدمون البرنامج.
    • CRD-2.F.3 بعض طرق إجراء الاستكشاف كما يلي:
      • جمع البيانات من خلال الاستطلاعات
      • اختبار المستخدمين
      • المقابلات
      • الملاحظات المباشرة
    • CRD-2.F.4 تصف متطلبات البرنامج كيفية عمل البرنامج وقد تتضمن وصفاً للتفاعلات التي يجب أن يوفرها البرنامج مع المستخدم.
    • CRD-2.F.5 تحدد مواصفات البرنامج متطلباته.
    • CRD-2.F.6 في عملية التطوير، ترسم مرحلة التصميم كيف يمكن إنجاز مواصفات برنامج معينة.
    • CRD-2.F.7 قد تشمل مرحلة تصميم البرنامج ما يلي:
      • العصف الذهني
      • التخطيط ورسم المشاهد
      • تنظيم البرنامج في وحدات ومكونات وظيفية
      • إنشاء مخططات تمثل تخطيطات واجهة المستخدم
      • تطوير استراتيجية اختبار للبرنامج

    هدف التعلم CRD-2.G: وصف الغرض من قطعة كود أو برنامج عن طريق كتابة التوثيق. [مهارة 4.A]

    • CRD-2.G.1 توثيق البرنامج هو وصف مكتوب لوظيفة قطعة كود، أو حدث، أو إجراء، أو برنامج وكيف تم تطويره.
    • CRD-2.G.2 التعليقات هي شكل من أشكال توثيق البرنامج يُكتب داخل البرنامج ليقرأه البشر ولا تؤثر على طريقة تشغيل البرنامج.
    • CRD-2.G.3 يجب على المبرمجين توثيق البرنامج طوال فترة تطويره.
    • CRD-2.G.4 يساعد توثيق البرنامج في تطوير وصيانة برامج صحيحة عند العمل بشكل فردي أو في بيئات برمجة تعاونية.
    • CRD-2.G.5 لا تدعم جميع بيئات البرمجة التعليقات، لذا قد تكون هناك حاجة لطرق أخرى للتوثيق.

    هدف التعلم CRD-2.H: الاعتراف بقطع الكود المستخدمة من مصادر أخرى. [مهارة 1.C]

    • CRD-2.H.1 من المهم الاعتراف بأي قطع كود طُورت بشكل تعاوني أو بواسطة مصدر آخر.
    • CRD-2.H.2 يمكن أن يكون الاعتراف بقطعة(قطاعات) كود كتبها شخص آخر ومُستخدمة في البرنامج ضمن توثيق البرنامج. يجب أن يشمل الاعتراس أصل الكود أو اسم المؤلف الأصلي.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Programs are built through an iterative 迭代 process, not in one straight line: investigate the problem and users, design (often with a diagram or written plan), implement in code, and test – then repeat. A large problem is broken into smaller pieces (decomposition 分解). Comments 注释 and clear naming document the design so others (and your future self) can understand it. Development is incremental – build and test a small piece, then add the next.

    Investigating what users actually need

    Before any code is written, the developer investigates the problem and the people who will use the program. Three ways to do that:

    • surveys 调查问卷 sent to potential users, which collect data from many people quickly;
    • interviews and direct observation of users doing the task by hand;
    • studying existing solutions to see what already works and what frustrates people.

    The findings are turned into a design. Two artefacts do that: a program requirements list saying exactly what the program must do, and diagrams representing the layout of the user interface 用户界面 — sketches showing which controls appear where, and what each one does when used. Designing the interface on paper first is cheaper than discovering after coding that the buttons are in the wrong place.

    Events, and programs that wait

    Not every program runs straight through from top to bottom. An event 事件 is generated when a key is pressed, a mouse is clicked, a program is started, or any other defined action occurs — and an event changes the flow of execution: the program pauses what it was doing and runs the code attached to that event, called an event handler 事件处理程序.

    This is why a program with a graphical interface can appear to be doing nothing: it is waiting for the next event. The order in which those events arrive is decided by the user, not by the programmer, so the same program can run its blocks in a different order each time it is used.

    العربية
    مبرمج يصحح أخطاء في محطة عمل متعددة الشاشات — التصميم والتكرار
    مبرمج يصحح أخطاء في محطة عمل متعددة الشاشات — التصميم والتكرار

    تُبنى البرامج عبر عملية تكرارية، وليس في خط مستقيم واحد: استقصِ المشكلة والمستخدمين، صمّم (غالباً باستخدام مخطط أو خطة مكتوبة)، نفذ الكود، وختبر – ثم كرر. يتم تقسيم المشكلات الكبيرة إلى أجزاء أصغر (التجزئة). تُوثّق التعليقات وتسميات واضحة التصميم حتى يتمكن الآخرون (وأنت في المستقبل) من فهمه. التطوير تدريجي – بنِ واختبر جزءاً صغيراً، ثم أضف الجزء التالي.

    مراحل تطوير البرنامج، مع إعادة الاختبار لإصلاح وتحسين
    مراحل تطوير البرنامج، مع إعادة الاختبار لإصلاح وتحسين
    يتم بناء البرمجيات عبر عملية تطوير تكرارية وتدرجية
    يتم بناء البرمجيات عبر عملية تطوير تكرارية وتدرجية

    استقصاء ما يحتاجه المستخدمون حقاً

    قبل كتابة أي كود، يستقصي المطور المشكلة والأشخاص الذين سيستخدمون البرنامج. ثلاث طرق للقيام بذلك:

    • استبيانات تُرسل للمستخدمين المحتملين، لجمع البيانات من عدد كبير من الناس بسرعة؛
    • مقابلات ومراقبة مباشرة للمستخدمين أثناء أداء المهمة يدوياً؛
    • دراسة الحلول الموجودة لمعرفة ما يعمل بالفعل وما يسبب الإحباط للناس.

    تُحوّل النتائج إلى تصميم. يقوم عنصران بذلك: قائمة متطلبات البرنامج التي تحدد بدقة ما يجب على البرنامج فعله، ومخططات تمثل تخطيط واجهة المستخدم – رسومات توضح أي الأزرار تظهر أين، وماذا تفعل كل منها عند استخدامها. تصميم الواجهة على الورق أولاً أرخص من اكتشاف بعد كتابة الكود أن الأزرار في المكان الخطأ.

    الأحداث، والبرامج التي تنتظر

    لا يعمل كل برنامج بشكل مباشر من الأعلى إلى الأسفل. يتم توليد حدث عند الضغط على مفتاح، أو النقر بالماوس، أو بدء البرنامج، أو حدوث أي إجراء آخر محدد – ويغير الحدث مسار التنفيذ: يتوقف البرنامج عن ما كان يفعله وينفذ الكود المرتبط بهذا الحدث، والذي يُسمى معالج الأحداث.

    ولهذا قد يبدو أن برنامجاً ذو واجهة رسومية لا يفعل شيئاً: فهو ينتظر الحدث التالي. ترتيب وصول هذه الأحداث يحدده المستخدم، وليس المبرمج، لذا يمكن لنفس البرنامج تنفيذ كتبه بترتيب مختلف في كل مرة يستخدم فيها.

    Explore · ⁨استكشف⁩

    Loop through the iterative development process · ⁨مرّ بعملية التطوير التكرارية⁩

    Development is iterative — you repeat the stages, improving the program a little on each pass. Step around the loop and notice it returns to the start rather than ending after one run. · ⁨التطوير تكراري — تكرار المراحل، وتحسين البرنامج قليلاً في كل دورة. مرّ حول الحلقة ولاحظ أنها تعود للبداية بدلاً من الانتهاء بعد تشغيل واحد.⁩

    1.4

    Identifying and Correcting Errors · ⁨تحديد الأخطاء وتصحيحها⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (CRD-2): Developers create and innovate using an iterative design process that is user-focused, that incorporates implementation/feedback cycles, and that leaves ample room for experimentation and risk-taking.

    Learning Objective CRD-2.I: For errors in an algorithm or program: a. Identify the error. [Skill 4.C] b. Correct the error. [Skill 4.C]

    • CRD-2.I.1 A logic error is a mistake in the algorithm or program that causes it to behave incorrectly or unexpectedly.
    • CRD-2.I.2 A syntax error is a mistake in the program where the rules of the programming language are not followed.
    • CRD-2.I.3 A run-time error is a mistake in the program that occurs during the execution of a program. Programming languages define their own run-time errors.
    • CRD-2.I.4 An overflow error is an error that occurs when a computer attempts to handle a number that is outside of the defined range of values.
    • CRD-2.I.5 The following are effective ways to find and correct errors:
      • test cases
      • hand tracing
      • visualizations
      • debuggers
      • adding extra output statement(s)

    Learning Objective CRD-2.J: Identify inputs and corresponding expected outputs or behaviors that can be used to check the correctness of an algorithm or program. [Skill 4.C]

    • CRD-2.J.1 In the development process, testing uses defined inputs to ensure that an algorithm or program is producing the expected outcomes. Programmers use the results from testing to revise their algorithms or programs.
    • CRD-2.J.2 Defined inputs used to test a program should demonstrate the different expected outcomes that are at or just beyond the extremes (minimum and maximum) of input data.
    • CRD-2.J.3 Program requirements are needed to identify appropriate defined inputs for testing.
    العربية

    فهم دائم (CRD-2): المطورون يبتكرون ويبتكرون باستخدام عملية تصميم تكرارية تركز على المستخدم، وتدمج دورات التنفيذ/التغذية الراجعة، وتترك مجالًا واسعًا للتجربة والمخاطرة.

    هدف التعلم CRD-2.I: للأخطاء في خوارزمية أو برنامج: أ. تحديد الخطأ. [مهارة 4.C] ب. تصحيح الخطأ. [مهارة 4.C]

    • CRD-2.I.1 الخطأ المنطقي هو خطأ في الخوارزمية أو البرنامج يتسبب في سلوكه بشكل غير صحيح أو غير متوقع.
    • CRD-2.I.2 الخطأ اللغوي هو خطأ في البرنامج حيث لا تُتبع قواعد لغة البرمجة.
    • CRD-2.I.3 خطأ وقت التشغيل هو خطأ في البرنامج يحدث أثناء تنفيذ البرنامج. تحدد لغات البرمجة أخطاء وقت التشغيل الخاصة بها.
    • CRD-2.I.4 خطأ الاندفاع هو خطأ يحدث عندما يحاول الحاسوب التعامل مع رقم يقع خارج نطاق القيم المعرف.
    • CRD-2.I.5 الطرق الفعالة لإيجاد الأخطاء وتصحيحها هي:
      • حالات الاختبار
      • تتبع يدوي
      • التصورات البصرية
      • أدوات تصحيح الأخطاء
      • إضافة جملة(ات) إخراج إضافية

    هدف التعلم CRD-2.J: تحديد المدخلات والمخرجات المتوقعة أو السلوكيات المقابلة التي يمكن استخدامها للتحقق من صحة خوارزمية أو برنامج. [مهارة 4.C]

    • CRD-2.J.1 في عملية التطوير، يستخدم الاختبار مدخلات محددة للتأكد من أن الخوارزمية أو البرنامج ينتج النتائج المتوقعة. يستخدم المبرمجون نتائج الاختبار لمراجعة خوارزمياتهم أو برامجهم.
    • CRD-2.J.2 يجب أن تُظهر المدخلات المحددة المستخدمة لاختبار البرنامج مخرجات متوقعة مختلفة تكون عند حدود البيانات المدخلة القصوى (الحد الأدنى والأقصى) أو قريبًا منها.
    • CRD-2.J.3 متطلبات البرنامج ضرورية لتحديد المدخلات المحددة المناسبة للاختبار.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    A bug is an error in a program; debugging 调试 is finding and fixing it. Three kinds:

    • a syntax error 语法错误 breaks the language's rules, so the program will not run;
    • a runtime error 运行时错误 crashes the program while it runs (e.g. dividing by zero);
    • a logic error 逻辑错误 lets it run but gives the wrong result.

    Find bugs by testing with different inputs, adding print statements to see values, and hand-tracing the code. Choose the test inputs deliberately: they should demonstrate the different expected outcomes at or just beyond the extremes — the minimum and maximum values the program should accept, and a value just outside each of them. A program that works on ordinary data very often fails on an empty list, a zero, or a value one past the end of a range, so those are the inputs worth trying first. Fixing one bug at a time and re-testing is the reliable method.

    Exam skill: be able to name the type of an error and describe a testing strategy that would catch it – a recurring multiple-choice and Create-task theme.

    Worked example. A program meant to print the average of two numbers instead runs avg = a + b / 2. Tracing the order of operations, / runs before +, so it computes $a+\tfrac{b}{2}$ rather than the average. Add parentheses to fix it: avg = (a + b) / 2. Testing with $a=4,\ b=6$ confirms the fix — the buggy line gives $4+3=7$, the corrected line gives $\tfrac{10}{2}=5$. Testing with known inputs is exactly how you find and confirm a logic error.

    العربية

    الخلل البرمجي هو خطأ في البرنامج؛ إصلاح الأخطاء هو العثور عليه وإصلاحه. ثلاثة أنواع:

    جدول التتبع يسجل قيمة كل متغير أثناء تشغيل البرنامج، لإيجاد الأخطاء
    جدول التتبع يسجل قيمة كل متغير أثناء تشغيل البرنامج، لإيجاد الأخطاء
    • خطأ في الصياغة يخالف قواعد اللغة، لذلك لن يعمل البرنامج؛
    • خطأ وقت التشغيل يتسبب في انهيار البرنامج أثناء عمله (مثل القسمة على صفر)؛
    • خطأ منطقي يسمح له بالعمل لكن يعطي نتيجة خاطئة.

    ابحث عن الأخطاء عن طريق الاختبار بمدخلات مختلفة، وإضافة أوامر طباعة لرؤية القيم، وتتبع الكود يدوياً. اختر مدخلات الاختبار بعناية: يجب أن توضح النتائج المتوقعة المختلفة عند أو بالقرب من الحواف القصوى – القيم الدنيا والعلى التي يجب أن يقبلها البرنامج، وقيمة خارج كل منها بقليل. غالباً ما يفشل برنامج يعمل على بيانات عادية عند قائمة فارغة، أو صفر، أو قيمة واحدة بعد نهاية نطاق معين، لذا فهي المدخلات التي تستحق تجربتها أولاً. إصلاح خلل واحد في كل مرة وإعادة الاختبار هي الطريقة الموثوقة.

    مهارة الامتحان: كن قادراً على تسمية نوع الخطأ ووصف استراتيجية اختبار ستكشف عنه – وهو موضوع متكرر في أسئلة الاختيار من متعدد ومهام الإنشاء.

    ثلاثة أنواع من أخطاء البرمجة: الصياغة، المنطق، ووقت التشغيل
    ثلاثة أنواع من أخطاء البرمجة: الصياغة، المنطق، ووقت التشغيل

    مثال محلول. برنامج مُصمم لطباعة متوسط عددين يقوم بدلاً من ذلك بتنفيذ avg = a + b / 2. بتتبع ترتيب العمليات، / يعمل قبل +، لذا يحسب $a+\tfrac{b}{2}$ بدلاً من المتوسط. أضف أقواس لحل المشكلة: avg = (a + b) / 2. الاختبار باستخدام $a=4,\ b=6$ يؤكد الإصلاح — السطر الخاطئ يعطي $4+3=7$، والسطر المصحح يعطي $\tfrac{10}{2}=5$. اختبار المدخلات المعروفة هو بالضبط كيف تجد وتؤكد خطأ المنطق.

    Explore · ⁨استكشف⁩

    Trace the guessing-game logic and spot a logic error · ⁨تتبع منطق لعبة التخمين واكتشف خطأ منطقياً⁩

    Drag the guess and watch which branch runs. A logic error would send the same guess down the wrong branch — the program still runs, but gives the wrong message. The secret number here is 50. · ⁨اسحب التخمين وانظر أي فرع سيتم تنفيذه. خطأ منطقي قد يوجه نفس التخمين إلى فرع خاطئ — البرنامج لا يزال يعمل، لكنه يعطي رسالة غير صحيحة. الرقم السري هنا هو 50.⁩

    1.4

    Exam tips · ⁨نصائح للامتحان⁩

    English
    • Much of CSP is assessed through the Create and written performance tasks — explain your reasoning clearly, not just your result.
    • Know the benefits of collaboration and how diverse perspectives reduce bias in a program.
    • Use precise vocabulary (iterative development, program requirements) when you describe a design process.
    • Give and take feedback constructively; credit collaborators and sources.
    • Break a large problem into smaller modules that a team can build in parallel.
    العربية
    • يتم تقييم الكثير من CSP من خلال مهام الإنشاء وأداء الكتابة – اشرح استدراكك بوضوح، وليس فقط نتيجتك.
    • تعرف فوائد التعاون وكيف تقلل وجهات النظر المتنوعة من التحيز في البرنامج.
    • استخدم مفردات دقيقة (التطوير التكراري، متطلبات البرنامج) عندما تصف عملية التصميم.
    • قدم واستقبل الملاحظات بشكل بناء؛ أعطِ الائتمان للمشاركين والمصادر.
    • قم بتقسيم مشكلة كبيرة إلى وحدات أصغر يمكن لفريق بنائها بالتوازي.
  • 2

    Data · ⁨البيانات⁩

    Watch lesson · ⁨شاهد الدرس⁩
    2.1

    Binary Numbers

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (DAT-1): The way a computer represents data internally is different from the way the data are interpreted and displayed for the user. Programs are used to translate data into a representation more easily understood by people.

    Learning Objective DAT-1.A: Explain how data can be represented using bits. [Skill 3.C]

    • DAT-1.A.1 Data values can be stored in variables, lists of items, or standalone constants and can be passed as input to (or output from) procedures.
    • DAT-1.A.2 Computing devices represent data digitally, meaning that the lowest-level components of any value are bits.
    • DAT-1.A.3 Bit is shorthand for binary digit and is either 0 or 1.
    • DAT-1.A.4 A byte is 8 bits.
    • DAT-1.A.5 Abstraction is the process of reducing complexity by focusing on the main idea. By hiding details irrelevant to the question at hand and bringing together related and useful details, abstraction reduces complexity and allows one to focus on the idea.
    • DAT-1.A.6 Bits are grouped to represent abstractions. These abstractions include, but are not limited to, numbers, characters, and color.
    • DAT-1.A.7 The same sequence of bits may represent different types of data in different contexts.
    • DAT-1.A.8 Analog data have values that change smoothly, rather than in discrete intervals, over time. Some examples of analog data include pitch and volume of music, colors of a painting, or position of a sprinter during a race.
    • DAT-1.A.9 The use of digital data to approximate real-world analog data is an example of abstraction.
    • DAT-1.A.10 Analog data can be closely approximated digitally using a sampling technique, which means measuring values of the analog signal at regular intervals called samples. The samples are measured to figure out the exact bits required to store each sample.

    Learning Objective DAT-1.B: Explain the consequences of using bits to represent data. [Skill 1.D]

    • DAT-1.B.1 In many programming languages, integers are represented by a fixed number of bits, which limits the range of integer values and mathematical operations on those values. This limitation can result in overflow or other errors.
    • DAT-1.B.2 Other programming languages provide an abstraction through which the size of representable integers is limited only by the size of the computer's memory; this is the case for the language defined in the exam reference sheet.
    • DAT-1.B.3 In programming languages, the fixed number of bits used to represent real numbers limits the range and mathematical operations on these values; this limitation can result in round-off and other errors. Some real numbers are represented as approximations in computer storage.
      • Exclusion statement: Specific range limitations for real numbers are outside the scope of this course and the AP Exam.

    Learning Objective DAT-1.C: For binary numbers: a. Calculate the binary (base 2) equivalent of a positive integer (base 10) and vice versa. [Skill 2.B] b. Compare and order binary numbers. [Skill 2.B]

    • DAT-1.C.1 Number bases, including binary and decimal, are used to represent data.
    • DAT-1.C.2 Binary (base 2) uses only combinations of the digits zero and one.
    • DAT-1.C.3 Decimal (base 10) uses only combinations of the digits $0 - 9$.
    • DAT-1.C.4 As with decimal, a digit's position in the binary sequence determines its numeric value. The numeric value is equal to the bit's value (0 or 1) multiplied by the place value of its position.
    • DAT-1.C.5 The place value of each position is determined by the base raised to the power of the position. Positions are numbered starting at the rightmost position with 0 and increasing by 1 for each subsequent position to the left.
    العربية

    فهم دائم (DAT-1): طريقة تمثيل الحاسوب للبيانات داخليًا تختلف عن كيفية تفسير وعرض البيانات للمستخدم. تُستخدم البرامج لترجمة البيانات إلى تمثيل أسهل في الفهم بالنسبة للبشر.

    هدف التعلم DAT-1.A: شرح كيفية تمثيل البيانات باستخدام البتات. [مهارة 3.C]

    • DAT-1.A.1 يمكن تخزين قيم البيانات في متغيرات، أو قوائم من العناصر، أو ثوابت مستقلة ويمكن تمريرها كمدخلات (أو كمخرجات) للإجراءات.
    • DAT-1.A.2 تمثل الأجهزة الحاسوبية البيانات رقميًا، مما يعني أن المكونات أدنى مستوى لأي قيمة هي البتات.
    • DAT-1.A.3 البت هو اختصار لـ رقم ثنائي ويكون إما 0 أو 1.
    • DAT-1.A.4 البايت يساوي 8 بتات.
    • DAT-1.A.5 التجريد هو عملية تقليل التعقيد من خلال التركيز على الفكرة الرئيسية. من خلال إخفاء التفاصيل غير ذات الصلة بالسؤال الحالي وتجميع التفاصيل ذات الصلة والمفيدة، يقلل التجريد من التعقيد ويسمح بالتركيز على الفكرة.
    • DAT-1.A.6 يتم تجميع البتات لتمثيل التجريدات. تشمل هذه التجريدات، ولا تقتصر على، الأرقام، الأحرف، والألوان.
    • DAT-1.A.7 قد تمثل نفس تسلسل البتات أنواعًا مختلفة من البيانات في سياقات مختلفة.
    • DAT-1.A.8 للبيانات التناظرية قيم تتغير بسلاسة، بدلاً من ذلك في فترات منفصلة، عبر الزمن. تشمل بعض أمثلة البيانات التناظرية نبرة وصوت الموسيقى، وألوان لوحة فنية، أو موضع عداء سريع أثناء السباق.
    • DAT-1.A.9 استخدام البيانات الرقمية لتقريب البيانات التناظرية الحقيقية هو مثال على التجريد.
    • DAT-1.A.10 يمكن تقريب البيانات التناظرية بدقة باستخدام تقنية أخذ العينات، والتي تعني قياس قيم الإشارة التناظرية على فترات منتظمة تسمى عينات. يتم قياس العينات لمعرفة عدد البتات الدقيقة المطلوبة لتخزين كل عينة.

    هدف التعلم DAT-1.B: شرح عواقب استخدام البتات لتمثيل البيانات. [مهارة 1.D]

    • DAT-1.B.1 في العديد من لغات البرمجة، يتم تمثيل الأعداد الصحيحة بعدد ثابت من البتات، مما يحد من نطاق قيم الأعداد الصحيحة والعمليات الحسابية عليها. يمكن أن تؤدي هذه limitation إلى تجاوز السعة (overflow) أو أخطاء أخرى.
    • DAT-1.B.2 توفر لغات برمجة أخرى تجريدًا يُقيّد فيه حجم الأعداد الصحيحة القابلة للتمثيل فقط بحجم ذاكرة الحاسوب؛ وهذا هو الحال بالنسبة للغاة المعرّفة في ورقة مرجع الامتحان.
    • DAT-1.B.3 في لغات البرمجة، يحد العدد الثابت من البتات المستخدمة لتمثيل الأعداد الحقيقية من نطاق العمليات الحسابية على هذه القيم؛ يمكن أن تؤدي هذه limitation إلى أخطاء التقريب وغيرها. يتم تمثيل بعض الأعداد الحقيقية كتقريبات في تخزين الحاسوب.
      • عبادة الاستبعاد: حدود النطاق المحددة للأعداد الحقيقية تقع خارج نطاق هذا المقرر وAP Exam.

    هدف التعلم DAT-1.C: للأرقام الثنائية: أ. حساب المكافئ الثنائي (القاعدة 2) لعدد صحيح موجب (القاعدة 10) والعكس. [مهارة 2.B] ب. مقارنة وترتيب الأرقام الثنائية. [مهارة 2.B]

    • DAT-1.C.1 تُستخدم قواعد الأرقام، بما في ذلك الثنائية والعشرية، لتمثيل البيانات.
    • DAT-1.C.2 تستخدم الثنائية (القاعدة 2) فقط مزيجًا من الرقمين صفر وواحد.
    • DAT-1.C.3 تستخدم العشرية (القاعدة 10) فقط مزيجًا من الأرقام $0 - 9$.
    • DAT-1.C.4 مثل العشرية، تحدد position الرقم في التسلسل الثنائي قيمته الرقمية. القيمة الرقمية تساوي قيمة البت (0 أو 1) مضروبة في قيمة مكانه.
    • DAT-1.C.5 تُحدد قيمة مكان كل position بواسطة القاعدة مرفوعة لأس الـ position. يتم ترقيم positions بدءًا من الـ position الأيمن بـ 0 increasing بمقدار 1 لكل position لاحق إلى اليسار.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    Binary digits on a display — all digital data is ultimately stored as 0s and 1s
    Binary digits on a display — all digital data is ultimately stored as 0s and 1s

    Computers store everything as bits 位 – each a 0 or 1. A group of 8 bits is a byte 字节. Numbers are stored in binary 二进制 (base 2), where each place is a power of two ($1, 2, 4, 8, 16, \dots$) instead of the powers of ten in decimal 十进制. For example, binary 1011 is $8+2+1=11$.

    An 8-bit place-value chart: the 1s sit under the values that add to the number
    An 8-bit place-value chart: the 1s sit under the values that add to the number

    Worked example. To convert binary 1101 to decimal, write the place values 8 4 2 1 under the bits 1 1 0 1 and add the ones that have a 1: $8+4+0+1=13$. Going the other way, convert 19 to binary by subtracting the largest power of two that fits: $19-16=3$, then $3-2=1$, then $1-1=0$, so the bits sit at the 16, 2, and 1 places $\rightarrow$ 10011 (check: $16+2+1=19$).

    Because a computer has a finite number of bits, it can represent only a limited range of values. This causes two effects tested on the exam:

    • Overflow error 溢出错误: a number too large for the available bits cannot be stored correctly.
    • Round-off (rounding) error 舍入错误: numbers with decimals (real numbers) can only be approximated, because infinitely many real values must map onto finitely many bit patterns.

    All data – text, images, sound – is ultimately encoded as binary. An image is a grid of pixels 像素, each stored as numbers for its colors; sound is stored as numbers sampled many times per second.

    Explore · ⁨استكشف⁩

    Convert between binary and decimal · ⁨التحويل بين النظام الثنائي والعشري⁩

    Computers store numbers in binary (base 2). Each bit is a power of two; add the place values of the 1-bits to read the decimal number. · ⁨تخزن الحواسيب الأرقام في النظام الثنائي (الأساس 2). كل بت يمثل قوة للعدد 2؛ اجمع قيم المواقع للأماكن التي تحتوي على 1 لقراءة الرقم العشري.⁩

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    bits/bɪts/ بتات
    byte/baɪt/ بايت
    binary/ˈbaɪnəri/ ثنائي
    decimal/ˈdesɪml/ عشري
    Overflow error/ˌəʊvəˈfləʊ ˈerə/ خطأ التجاوز
    Round-off (rounding) error/raʊnd ɒf ˈerə/ خطأ التقريب (التقريب)
    pixels/ˈpɪkslz/ بكسلات
    Watch lesson · ⁨شاهد الدرس⁩
    2.2

    Data Compression

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (DAT-1): The way a computer represents data internally is different from the way the data are interpreted and displayed for the user. Programs are used to translate data into a representation more easily understood by people.

    Learning Objective DAT-1.D: Compare data compression algorithms to determine which is best in a particular context. [Skill 1.D]

    • DAT-1.D.1 Data compression can reduce the size (number of bits) of transmitted or stored data.
    • DAT-1.D.2 Fewer bits does not necessarily mean less information.
    • DAT-1.D.3 The amount of size reduction from compression depends on both the amount of redundancy in the original data representation and the compression algorithm applied.
    • DAT-1.D.4 Lossless data compression algorithms can usually reduce the number of bits stored or transmitted while guaranteeing complete reconstruction of the original data.
    • DAT-1.D.5 Lossy data compression algorithms can significantly reduce the number of bits stored or transmitted but only allow reconstruction of an approximation of the original data.
    • DAT-1.D.6 Lossy data compression algorithms can usually reduce the number of bits stored or transmitted more than lossless compression algorithms.
    • DAT-1.D.7 In situations where quality or ability to reconstruct the original is maximally important, lossless compression algorithms are typically chosen.
    • DAT-1.D.8 In situations where minimizing data size or transmission time is maximally important, lossy compression algorithms are typically chosen.
    العربية

    فهم دائم (DAT-1): طريقة تمثيل الحاسوب للبيانات داخليًا تختلف عن كيفية تفسير وعرض البيانات للمستخدم. تُستخدم البرامج لترجمة البيانات إلى تمثيل أسهل في الفهم بالنسبة للبشر.

    هدف التعلم DAT-1.D: مقارنة خوارزميات ضغط البيانات لتحديد الأفضل في سياق معين. [مهارة 1.D]

    • DAT-1.D.1 يمكن أن يقلل ضغط البيانات من الحجم (عدد البتات) للبيانات المرسلة أو المخزنة.
    • DAT-1.D.2 عدد أقل من البتات لا يعني بالضرورة معلومات أقل.
    • DAT-1.D.3 يعتمد مقدار الانخفاض في الحجم من الضغط على كل من مقدار التكرار في تمثيل البيانات الأصلي وخوارزمية الضغط المطبقة.
    • DAT-1.D.4 يمكن لخوارزميات ضغط البيانات بدون فقدان عادةً تقليل عدد البتات المخزنة أو المرسلة مع ضمان إعادة بناء كاملة للبيانات الأصلية.
    • DAT-1.D.5 يمكن لخوارزميات ضغط البيانات بفقدان تقليل عدد البتات المخزنة أو المرسلة بشكل كبير ولكنها تسمح فقط بإعادة بناء تقدير للبيانات الأصلية.
    • DAT-1.D.6 يمكن لخوارزميات ضغط البيانات بفقدان عادةً تقليل عدد البتات المخزنة أو المرسلة أكثر من خوارزميات ضغط البيانات بدون فقدان.
    • DAT-1.D.7 في المواقف التي يكون فيها جودة البيانات أو القدرة على استعادة الأصلية ذات أهمية قصوى، يتم عادة اختيار خوارزميات الضغط غير المفقود.
    • DAT-1.D.8 في المواقف التي يكون فيها تقليل حجم البيانات أو وقت النقل ذات أهمية قصوى، يتم عادة اختيار خوارزميات الضغط المفقود.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    Hard-disk platters and head: data compressed and stored as magnetic patterns
    Hard-disk platters and head: data compressed and stored as magnetic patterns

    Compression 压缩 reduces the number of bits needed to store or send data. Two kinds:

    Compression methods: lossless versus lossy, with common examples
    Compression methods: lossless versus lossy, with common examples
    • Lossless compression 无损压缩 lets you restore the exact original data (used for text and programs, where every bit matters).
    • Lossy compression 有损压缩 throws away some data to shrink the size further (used for photos, music, video, where a small quality loss is acceptable).

    Choosing between them trades size against fidelity: lossless keeps everything but saves less; lossy saves more but loses detail permanently. Prefer lossless when the data must be exact.

    Explore · ⁨استكشف⁩

    Compress a run of repeats · ⁨ضغط سلسلة التكرار⁩

    Run-length encoding is a lossless compression: a long run of the same symbol is replaced by the symbol and a count, shrinking the data with no information lost. · ⁨التشفير بطول التسلسل هو ضغط غير خاسر: يتم استبدال سلسلة طويلة من نفس الرمز بالرمز وعدد تكراره، مما يقلل حجم البيانات دون فقدان أي معلومات.⁩

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    Compression/kəmˈpreʃn/ ضغط
    Lossless compression/ˈlɒsləs kəmˈpreʃn/ الضغط غير الخاسر
    Lossy compression/ˈlɒsi kəmˈpreʃn/ الضغط مع الخسارة
    Watch lesson · ⁨شاهد الدرس⁩
    2.3

    Extracting Information from Data

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (DAT-2): Programs can be used to process data, which allows users to discover information and create new knowledge.

    Learning Objective DAT-2.A: Describe what information can be extracted from data. [Skill 5.B]

    • DAT-2.A.1 Information is the collection of facts and patterns extracted from data.
    • DAT-2.A.2 Data provide opportunities for identifying trends, making connections, and addressing problems.
    • DAT-2.A.3 Digitally processed data may show correlation between variables. A correlation found in data does not necessarily indicate that a causal relationship exists. Additional research is needed to understand the exact nature of the relationship.
    • DAT-2.A.4 Often, a single source does not contain the data needed to draw a conclusion. It may be necessary to combine data from a variety of sources to formulate a conclusion.

    Learning Objective DAT-2.B: Describe what information can be extracted from metadata. [Skill 5.B]

    • DAT-2.B.1 Metadata are data about data. For example, the piece of data may be an image, while the metadata may include the date of creation or the file size of the image.
    • DAT-2.B.2 Changes and deletions made to metadata do not change the primary data.
    • DAT-2.B.3 Metadata are used for finding, organizing, and managing information.
    • DAT-2.B.4 Metadata can increase the effective use of data or data sets by providing additional information.
    • DAT-2.B.5 Metadata allow data to be structured and organized.

    Learning Objective DAT-2.C: Identify the challenges associated with processing data. [Skill 5.D]

    • DAT-2.C.1 The ability to process data depends on the capabilities of the users and their tools.
    • DAT-2.C.2 Data sets pose challenges regardless of size, such as:
      • the need to clean data
      • incomplete data
      • invalid data
      • the need to combine data sources
    • DAT-2.C.3 Depending on how data were collected, they may not be uniform. For example, if users enter data into an open field, the way they choose to abbreviate, spell, or capitalize something may vary from user to user.
    • DAT-2.C.4 Cleaning data is a process that makes the data uniform without changing their meaning (e.g., replacing all equivalent abbreviations, spellings, and capitalizations with the same word).
    • DAT-2.C.5 Problems of bias are often created by the type or source of data being collected. Bias is not eliminated by simply collecting more data.
    • DAT-2.C.6 The size of a data set affects the amount of information that can be extracted from it.
    • DAT-2.C.7 Large data sets are difficult to process using a single computer and may require parallel systems.
    • DAT-2.C.8 Scalability of systems is an important consideration when working with data sets, as the computational capacity of a system affects how data sets can be processed and stored.
    العربية

    الفهم الدائم (DAT-2): يمكن استخدام البرامج لمعالجة البيانات، مما يسمح للمستخدمين باكتشاف المعلومات وخلق معرفة جديدة.

    هدف التعلم DAT-2.A: صف المعلومات التي يمكن استخلاصها من البيانات. [مهارة 5.B]

    • DAT-2.A.1 المعلومات هي مجموعة الحقائق والأنماط المستخرجة من البيانات.
    • DAT-2.A.2 توفر البيانات فرصًا لتحديد الاتجاهات وإ建立 الروابط وحل المشكلات.
    • DAT-2.A.3 قد تظهر البيانات المعالجة رقميًا ارتباطًا بين المتغيرات. لا يشير الارتباط المكتشف في البيانات بالضرورة إلى وجود علاقة سببية. هناك حاجة إلى بحث إضافي لفهم الطبيعة الدقيقة للعلاقة.
    • DAT-2.A.4 غالبًا ما لا يحتوي مصدر واحد على البيانات اللازمة لاستنتاج نتيجة. قد يكون من الضروري دمج بيانات من مصادر متعددة لصياغة استنتاج.

    هدف التعلم DAT-2.B: صف المعلومات التي يمكن استخلاصها من البيانات الوصفية. [مهارة 5.B]

    • DAT-2.B.1 البيانات الوصفية هي بيانات حول البيانات. على سبيل المثال، قد تكون قطعة البيانات صورة، بينما قد تشمل البيانات الوصفية تاريخ الإنشاء أو حجم ملف الصورة.
    • DAT-2.B.2 لا تؤدي التغييرات والحذفات التي يتم إجراؤها على البيانات الوصفية إلى تغيير البيانات الأساسية.
    • DAT-2.B.3 تُستخدم البيانات الوصفية للعثور على المعلومات وتنظيمها وإدارتها.
    • DAT-2.B.4 يمكن للبيانات الوصفية زيادة الاستخدام الفعال للبيانات أو مجموعات البيانات من خلال تقديم معلومات إضافية.
    • DAT-2.B.5 تسمح البيانات الوصفية بهيكلة البيانات وتنظيمها.

    هدف التعلم DAT-2.C: حدد التحديات المرتبطة بمعالجة البيانات. [مهارة 5.D]

    • DAT-2.C.1 تعتمد القدرة على معالجة البيانات على قدرات المستخدمين وأدواتهم.
    • DAT-2.C.2 تفرض مجموعات البيانات تحديات بغض النظر عن الحجم، مثل:
      • الحاجة إلى تنظيف البيانات
      • البيانات غير المكتملة
      • البيانات غير الصالحة
      • الحاجة إلى دمج مصادر البيانات
    • DAT-2.C.3 اعتمادًا على كيفية جمع البيانات، قد لا تكون موحدة. على سبيل المثال، إذا أدخل المستخدمون البيانات في حقل مفتوح، فقد تختلف طريقة اختيارهم للاختصارات أو الإملاء أو كتابة الأحرف الكبيرة من مستخدم لآخر.
    • DAT-2.C.4 تنظيف البيانات هو عملية تجعل البيانات موحدة دون تغيير معناها (مثل استبدال جميع الاختصارات والإملاءات وكتابة الأحرف Large المتكافئة بكلمة واحدة).
    • DAT-2.C.5 غالبًا ما تنشأ مشاكل التحيز من نوع أو مصدر البيانات المجمعة. لا يتم القضاء على التحيز ببساطة عن طريق جمع المزيد من البيانات.
    • DAT-2.C.6 يؤثر حجم مجموعة البيانات على كمية المعلومات التي يمكن استخلاصها منها.
    • DAT-2.C.7 يصعب معالجة مجموعات البيانات الكبيرة باستخدام جهاز كمبيوتر واحد وقد تتطلب أنظمة متوازية.
    • DAT-2.C.8 قابلية التوسع في الأنظمة اعتبار مهم عند العمل مع مجموعات البيانات، حيث أن السعة الحسابية للنظام تؤثر على كيفية معالجة وتخزين مجموعات البيانات.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    Data 数据 becomes useful when we extract information 信息 from it – patterns, trends, and answers to questions. Large data sets can reveal correlations a small one cannot, but data must be cleaned (fixing errors and inconsistencies) and often transformed or filtered first. A correlation 相关性 between two things does not prove that one causes the other – a key caution. Metadata 元数据 (data about data, like a photo's date and location) helps organize and search large collections.

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    Data/ˈdeɪtə/ البيانات
    information/ˌɪnfəˈmeɪʃn/ معلومات
    correlation/ˌkɒrɪˈleɪʃn/ الارتباط
    Metadata/ˌmetəˈdeɪtə/ البيانات الوصفية
    2.4

    Using Programs with Data

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (DAT-2): Programs can be used to process data, which allows users to discover information and create new knowledge.

    Learning Objective DAT-2.D: Extract information from data using a program. [Skill 2.B]

    • DAT-2.D.1 Programs can be used to process data to acquire information.
    • DAT-2.D.2 Tables, diagrams, text, and other visual tools can be used to communicate insight and knowledge gained from data.
    • DAT-2.D.3 Search tools are useful for efficiently finding information.
    • DAT-2.D.4 Data filtering systems are important tools for finding information and recognizing patterns in data.
    • DAT-2.D.5 Programs such as spreadsheets help efficiently organize and find trends in information.
    • DAT-2.D.6 Some processes that can be used to extract or modify information from data include the following:
      • transforming every element of a data set, such as doubling every element in a list, or adding a parent's email to every student record
      • filtering a data set, such as keeping only the positive numbers from a list, or keeping only students who signed up for band from a record of all the students
      • combining or comparing data in some way, such as adding up a list of numbers, or finding the student who has the highest GPA
      • visualizing a data set through a chart, graph, or other visual representation

    Learning Objective DAT-2.E: Explain how programs can be used to gain insight and knowledge from data. [Skill 5.B]

    • DAT-2.E.1 Programs are used in an iterative and interactive way when processing information to allow users to gain insight and knowledge about data.
    • DAT-2.E.2 Programmers can use programs to filter and clean digital data, thereby gaining insight and knowledge.
    • DAT-2.E.3 Combining data sources, clustering data, and classifying data are parts of the process of using programs to gain insight and knowledge from data.
    • DAT-2.E.4 Insight and knowledge can be obtained from translating and transforming digitally represented information.
    • DAT-2.E.5 Patterns can emerge when data are transformed using programs.
    العربية

    الفهم الدائم (DAT-2): يمكن استخدام البرامج لمعالجة البيانات، مما يسمح للمستخدمين باكتشاف المعلومات وخلق معرفة جديدة.

    هدف التعلم DAT-2.D: استخرج المعلومات من البيانات باستخدام برنامج. [مهارة 2.B]

    • DAT-2.D.1 يمكن استخدام البرامج لمعالجة البيانات للحصول على المعلومات.
    • DAT-2.D.2 يمكن استخدام الجداول والمخططات والنصوص وأدوات مرئية أخرى لتوصيل الرؤى والمعرفة المستمدة من البيانات.
    • DAT-2.D.3 أدوات البحث مفيدة للعثور على المعلومات بكفاءة.
    • DAT-2.D.4 أنظمة تصفية البيانات أدوات مهمة للعثور على المعلومات والتعرف على الأنماط في البيانات.
    • DAT-2.D.5 تساعد برامج مثل جداول البيانات في تنظيم البيانات بكفاءة وإيجاد الاتجاهات فيها.
    • DAT-2.D.6 بعض العمليات التي يمكن استخدامها لاستخراج أو تعديل المعلومات من البيانات تشمل ما يلي:
      • تحويل كل عنصر في مجموعة بيانات، مثل مضاعفة كل عنصر في قائمة، أو إضافة بريد إلكتروني لأحد الوالدين إلى سجل كل طالب
      • تصفية مجموعة بيانات، مثل الاحتفاظ بالأرقام الموجبة فقط من قائمة، أو الاحتفاظ بالطالبين الذين سجلوا في فرقة موسيقية فقط من سجل جميع الطلاب
      • دمج أو مقارنة البيانات بطريقة ما، مثل جمع قائمة من الأرقام، أو العثور على الطالب الذي لديه أعلى معدل تراكمي
      • تمثيل مجموعة بيانات بصريًا من خلال مخطط بياني أو رسم بياني أو تمثيل بصري آخر

    هدف التعلم DAT-2.E: اشرح كيف يمكن استخدام البرامج لاكتساب رؤى ومعرفة من البيانات. [مهارة 5.B]

    • DAT-2.E.1 تُستخدم البرامج بطريقة تكرارية وتفاعلية عند معالجة المعلومات للسماح للمستخدمين باكتساب رؤى ومعرفة حول البيانات.
    • DAT-2.E.2 يمكن للمبرمجين استخدام البرامج لتصفية وتنظيف البيانات الرقمية، وبالتالي اكتساب رؤى ومعرفة.
    • DAT-2.E.3 دمج مصادر البيانات، وتجميع البيانات، وتصنيف البيانات هي أجزاء من عملية استخدام البرامج لاكتساب رؤى ومعرفة من البيانات.
    • DAT-2.E.4 يمكن الحصول على رؤى ومعرفة من خلال ترجمة وتحويل المعلومات الممثلة رقميًا.
    • DAT-2.E.5 يمكن أن تظهر أنماط عندما يتم تحويل البيانات باستخدام البرامج.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    Programs process data at scales humans cannot. Common operations are filtering 过滤 (keeping only rows that meet a condition), cleaning (removing errors), and visualizing 可视化 (charts and graphs that make patterns visible). Combining data from multiple sources can reveal more, but raises privacy 隐私 concerns. Interactive tools and visualizations let people explore data and draw their own conclusions.

    Exam skill: be able to explain how a program helps find information in a large data set, and why correlation shown in the data does not establish causation.

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    filtering/ˈfɪltərɪŋ/ التصفية
    visualizing/ˈvɪʒuːəlaɪzɪŋ/ التصور البصري
    privacy/ˈprɪvəsi/ الخصوصية
    2.4

    Exam tips

    • Convert confidently between binary, decimal, and (where asked) hexadecimal — practise until it is quick.
    • Remember a bit is one binary digit and a byte is 8 bits; $n$ bits represent $2^n$ values.
    • Explain that all data — numbers, text, images, sound — is stored as binary, and that finite bits cause overflow and round-off.
    • Distinguish lossless from lossy compression and when each is appropriate.
    • Show the analog-to-digital idea: sampling turns a continuous signal into discrete values.
  • 3

    Algorithms and Programming · ⁨الخوارزميات والبرمجة⁩

    Watch lesson · ⁨شاهد الدرس⁩
    English

    Code below uses the AP CSP pseudocode – the exam's language-neutral reference. Assignment is written a ← expression, and list indices start at 1.

    العربية

    الكود أدناه يستخدم الرمز الوهمي لـ AP CSP – المرجع المحايد لغويًا للامتحان. عملية الإسناد تُكتب a ← expression، ومؤشرات القوائم تبدأ من 1.

    3.1

    Variables and Assignments · ⁨المتغيرات والإسناد⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-1): To find specific solutions to generalizable problems, programmers represent and organize data in multiple ways.

    Learning Objective AAP-1.A: Represent a value with a variable. [Skill 3.A]

    • AAP-1.A.1 A variable is an abstraction inside a program that can hold a value. Each variable has associated data storage that represents one value at a time, but that value can be a list or other collection that in turn contains multiple values.
    • AAP-1.A.2 Using meaningful variable names helps with the readability of program code and understanding of what values are represented by the variables.
    • AAP-1.A.3 Some programming languages provide types to represent data, which are referenced using variables. These types include numbers, Booleans, lists, and strings.
    • AAP-1.A.4 Some values are better suited to representation using one type of datum rather than another.

    Learning Objective AAP-1.B: Determine the value of a variable as a result of an assignment. [Skill 4.B]

    • AAP-1.B.1 The assignment operator allows a program to change the value represented by a variable.

    • AAP-1.B.2 The exam reference sheet provides the "$\leftarrow$" operator to use for assignment. For example,

      Text:

      a ← expression

      Block:

      a ← expression

      evaluates expression and then assigns a copy of the result to the variable a.

    • AAP-1.B.3 The value stored in a variable will be the most recent value assigned. For example:

      a ← 1 b ← a a ← 2 display(b)

      still displays 1.

    العربية

    الفهم الدائم (AAP-1): لإيجاد حلول محددة لمشاكل قابلة للتعميم، يمثل المبرمجون وينظمون البيانات بطرق متعددة.

    هدف التعلم AAP-1.A: تمثیل قيمة بمتغير. [مهارة 3.A]

    • AAP-1.A.1 المتغير هو تجريد داخل برنامج يمكنه احتواء قيمة. كل متغير له مساحة تخزين بيانات مرتبطة به تمثل قيمة واحدة في كل مرة، لكن تلك القيمة يمكن أن تكون قائمة أو مجموعة أخرى تحتوي بدورها على قيم متعددة.
    • AAP-1.A.2 استخدام أسماء متغيرات ذات دلالة يساعد في قراءة كود البرنامج وفهم القيم التي تمثلها المتغيرات.
    • AAP-1.A.3 توفر بعض لغات البرمجة أنواعاً لتمثيل البيانات، والتي يتم الاستشهاد بها باستخدام المتغيرات. تشمل هذه الأنواع الأرقام والقيم المنطقية والقوائم والسلاسل النصية.
    • AAP-1.A.4 بعض القيم أكثر ملاءمة للتمثيل باستخدام نوع واحد من البيانات بدلاً من نوع آخر.

    هدف التعلم AAP-1.B: تحديد قيمة المتغير كنتيجة لعملية إسناد. [مهارة 4.B]

    • AAP-1.B.1 يسمح مشغل الإسناد للبرنامج بتغيير القيمة التي يمثلها المتغير.

    • AAP-1.B.2 يوفر ورقة مرجع الامتحان مشغلاً "$\leftarrow$" للاستخدام في الإسناد. على سبيل المثال،

      النص:

      a ← expression

      الكتلة:

      a ← expression

      يُقيّم expression ثم يُسند نسخة من النتيجة إلى المتغير a.

    • AAP-1.B.3 ستكون القيمة المخزنة في المتغير هي أحدث قيمة تم إسنادها. على سبيل المثال:

      a ← 1 b ← a a ← 2 display(b)

      لا يزال يعرض 1.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    A variable 变量 is a named place that holds a value. The assignment 赋值 operator stores the value on the right into the variable on the left:

    A variable holds one value at a time; assigning again replaces it. Variables let a program store input, remember results, and reuse them.

    العربية

    المتغير هو مكان مسماه يحمل قيمة. عامل الإسناد يخزن القيمة الموجودة على اليمين في المتغير الموجود على اليسار:

    المتغير هو مخزن مسمّى يمكن أن تتغير قيمته
    المتغير هو مخزن مسمّى يمكن أن تتغير قيمته
    a ← 5
    b ← a + 3      // b is now 8
    

    المتغير يحمل قيمة واحدة في كل مرة؛ إعادة الإسناد تستبدله. المتغيرات تسمح للبرنامج بتخزين المدخلات، وتذكر النتائج، وإعادة استخدامها.

    Explore · ⁨استكشف⁩

    Watch a variable hold and change its value · ⁨شاهد متغير يحتفظ بقيمت ويتغير⁩

    A variable is a named box that stores one value at a time. An assignment copies a value into the box; assigning again overwrites whatever was there. · ⁨المتغير هو صندوق مسماه يخزن قيمة واحدة في كل مرة. المسح ينسخ قيمة إلى الصندوق؛ المسح مرة أخرى يحل محل ما كان موجودًا.⁩

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    variable/ˈveərɪəbl/ حدث
    assignment/əˈsaɪnmənt/ التعيين (assignment)
    3.2

    Data Abstraction · ⁨تجريد البيانات⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-1): To find specific solutions to generalizable problems, programmers represent and organize data in multiple ways.

    Learning Objective AAP-1.C: Represent a list or string using a variable. [Skill 3.A]

    • AAP-1.C.1 A list is an ordered sequence of elements. For example,

      [value1, value2, value3, ...]

      describes a list where value1 is the first element, value2 is the second element, value3 is the third element, and so on.

    • AAP-1.C.2 An element is an individual value in a list that is assigned a unique index.

    • AAP-1.C.3 An index is a common method for referencing the elements in a list or string using natural numbers.

    • AAP-1.C.4 A string is an ordered sequence of characters.

    Learning Objective AAP-1.D: For data abstraction: a. Develop data abstraction using lists to store multiple elements. [Skill 3.B] b. Explain how the use of data abstraction manages complexity in program code. [Skill 3.C]

    • AAP-1.D.1 Data abstraction provides a separation between the abstract properties of a data type and the concrete details of its representation.

    • AAP-1.D.2 Data abstractions manage complexity in programs by giving a collection of data a name without referencing the specific details of the representation.

    • AAP-1.D.3 Data abstractions can be created using lists.

    • AAP-1.D.4 Developing a data abstraction to implement in a program can result in a program that is easier to develop and maintain.

    • AAP-1.D.5 Data abstractions often contain different types of elements.

    • AAP-1.D.6 The use of lists allows multiple related items to be treated as a single value. Lists are referred to by different names, such as array, depending on the programming language.

      • Exclusion statement (EK AAP-1.D.6): The use of linked lists is outside the scope of this course and the AP Exam.
    • AAP-1.D.7 The exam reference sheet provides the notation

      [value1, value2, value3, ...]

      to create a list with those values as the first, second, third, and so on items. For example,

      • Text:

        aList ← [value1, value2, value3, ...]

        Block:

        aList ← value1, value2, value3

        creates a new list that contains the values value1, value2, value3, and ... at indices 1, 2, 3, and ... respectively and assigns it to aList.

      • Text:

        aList ← []

        Block:

        aList ← (empty)

        creates a new empty list and assigns it to aList.

      • Text:

        aList ← bList

        Block:

        aList ← bList

        assigns a copy of the list bList to the list aList. For example, if bList contains [20, 40, 60], then aList will also contain [20, 40, 60] after the assignment.

    • AAP-1.D.8 The exam reference sheet describes a list structure whose index values are 1 through the number of elements in the list, inclusive. For all list operations, if a list index is less than 1 or greater than the length of the list, an error message is produced and the program will terminate.

    العربية

    الفهم الدائم (AAP-1): لإيجاد حلول محددة لمشاكل قابلة للتعميم، يمثل المبرمجون وينظمون البيانات بطرق متعددة.

    هدف التعلم AAP-1.C: تمثيل قائمة أو سلسلة باستخدام متغير. [مهارة 3.A]

    • AAP-1.C.1 القائمة هي تسلسل مرتب من العناصر. على سبيل المثال،

      [value1, value2, value3, ...]

      يصف قائمة حيث value1 هو العنصر الأول، value2 هو العنصر الثاني، value3 هو العنصر الثالث، وهكذا.

    • AAP-1.C.2 العنصر هو قيمة فردية في قائمة يتم تعيين فهرس فريد لها.

    • AAP-1.C.3 الفهرس هو طريقة شائعة للإشارة إلى عناصر القائمة أو السلسلة باستخدام الأعداد الطبيعية.

    • AAP-1.C.4 السلسلة هي تسلسل مرتب من الأحرف.

    هدف التعلم AAP-1.D: لتجريد البيانات: أ. طوّر تجريد البيانات باستخدام القوائم لتخزين عناصر متعددة. [مهارة 3.B] ب. اشرح كيف يدير استخدام تجريد البيانات التعقيد في كود البرنامج. [مهارة 3.C]

    • AAP-1.D.1 يوفر تجريد البيانات فصلًا بين الخصائص المجردة لنوع البيانات والتفاصيل الملموسة لتمثيله.

    • AAP-1.D.2 تدير تجريدات البيانات التعقيد في البرامج من خلال إعطاء مجموعة بيانات اسمًا دون الإشارة إلى التفاصيل المحددة للتمثيل.

    • AAP-1.D.3 يمكن إنشاء تجريدات بيانات باستخدام القوائم.

    • AAP-1.D.4 تطوير تجريد بيانات لتنفيذه في برنامج قد يؤدي إلى برنامج أسهل في التطوير والصيانة.

    • AAP-1.D.5 تحتوي التجريدات البياناتية غالبًا على أنواع مختلفة من العناصر.

    • AAP-1.D.6 يسمح استخدام القوائم بمعاملة عناصر متعددة ذات صلة كقيمة واحدة. تُشار إلى القوائم بأسماء مختلفة، مثل مصفوفة (array)، اعتمادًا على لغة البرمجة المستخدمة.

      • استثناء (EK AAP-1.D.6): استخدام القوائم المترابطة خارج نطاق هذا المقرر وامتحان AP.
    • AAP-1.D.7 توفر ورقة إشارات الامتحان الترميز

      [value1, value2, value3, ...]

      لإنشاء قائمة بتلك القيم كأول عنصر، والثاني، والثالث، وهكذا. على سبيل المثال،

      • النص:

        aList ← [value1, value2, value3, ...]

        الكتلة:

        aList ← value1, value2, value3

        ينشئ قائمة جديدة تحتوي على القيم value1، value2، value3، و... عند الفهارس 1، 2، 3، و... على التوالي ويخصصها لـ aList.

      • النص:

        aList ← []

        الكتلة:

        aList ← (فارغة)

        ينشئ قائمة فارغة جديدة ويخصصها لـ aList.

      • النص:

        aList ← bList

        الكتلة:

        aList ← bList

        يخصص نسخة من القائمة bList للقائمة aList. على سبيل المثال، إذا كانت bList تحتوي على [20, 40, 60]، فإن aList ستحتوي أيضًا على [20, 40, 60] بعد عملية التخصيص.

    • AAP-1.D.8 تصور ورقة إشارات الامتحان بنية قائمة تكون فيها قيم الفهارس من 1 إلى عدد العناصر في القائمة، شاملة الطرفين. بالنسبة لجميع عمليات القائمة، إذا كان فهرس القائمة أقل من 1 أو أكبر من طول القائمة، يتم إنتاج رسالة خطأ ويتوقف البرنامج.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Data abstraction 数据抽象 lets you manage complexity by giving a single name to a collection of data – for example, a list rather than dozens of separate variables. It hides detail: you use the named collection without worrying about how it is stored. Lists (below) are the course's main data abstraction.

    العربية

    تجريد البيانات (Data abstraction) lets you manage complexity by giving a single name to a collection of data – for example, a list rather than dozens of separate variables. It hides detail: you use the named collection without worrying about how it is stored. Lists (below) are the course's main data abstraction.

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    Data abstraction/ˈdeɪtə əbˈstrækʃn/ تجريد البيانات
    remainder/rɪˈmeɪndə/ الباقي
    list/lɪst/ قائمة
    abstraction/əbˈstrækʃn/ التجريد
    library/ˈlaɪbrəri/ مكتبة
    simulation/ˌsɪmjʊˈleɪʃn/ محاكاة
    Efficiency/ɪˈfɪʃənsi/ الكفاءة
    heuristic/hjuːˈrɪstɪk/ خوارزمية استدلالية (heuristic)
    undecidable/ˌʌndɪˈsaɪdəbl/ غير قابل للحسم
    Interface/ˈɪntəfeɪs/ واجهة
    3.3

    Mathematical Expressions · ⁨التعبيرات الرياضية⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-2): The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.

    Learning Objective AAP-2.A: Express an algorithm that uses sequencing without using a programming language. [Skill 2.A]

    • AAP-2.A.1 An algorithm is a finite set of instructions that accomplish a specific task.
    • AAP-2.A.2 Beyond visual and textual programming languages, algorithms can be expressed in a variety of ways, such as natural language, diagrams, and pseudocode.
    • AAP-2.A.3 Algorithms executed by programs are implemented using programming languages.
    • AAP-2.A.4 Every algorithm can be constructed using combinations of sequencing, selection, and iteration.

    Learning Objective AAP-2.B: Represent a step-by-step algorithmic process using sequential code statements. [Skill 2.B]

    • AAP-2.B.1 Sequencing is the application of each step of an algorithm in the order in which the code statements are given.
    • AAP-2.B.2 A code statement is a part of program code that expresses an action to be carried out.
    • AAP-2.B.3 An expression can consist of a value, a variable, an operator, or a procedure call that returns a value.
    • AAP-2.B.4 Expressions are evaluated to produce a single value.
    • AAP-2.B.5 The evaluation of expressions follows a set order of operations defined by the programming language.
    • AAP-2.B.6 Sequential statements execute in the order they appear in the code segment.
    • AAP-2.B.7 Clarity and readability are important considerations when expressing an algorithm in a programming language.

    Learning Objective AAP-2.C: Evaluate expressions that use arithmetic operators. [Skill 4.B]

    • AAP-2.C.1 Arithmetic operators are part of most programming languages and include addition, subtraction, multiplication, division, and modulus operators.

    • AAP-2.C.2 The exam reference sheet provides a MOD b, which evaluates to the remainder when a is divided by b. Assume that a is an integer greater than or equal to 0 and b is an integer greater than 0. For example, 17 MOD 5 evaluates to 2.

    • AAP-2.C.3 The exam reference sheet provides the arithmetic operators +, -, *, /, and MOD.

      Text and Block:

      • a + b
      • a - b
      • a * b
      • a / b
      • a MOD b

      These are used to perform arithmetic on a and b. For example, 17 / 5 evaluates to 3.4.

    • AAP-2.C.4 The order of operations used in mathematics applies when evaluating expressions. The MOD operator has the same precedence as the * and / operators.

    العربية

    فهم دائم (AAP-2): تحدد طريقة ترتيب الجمل ودمجها في البرنامج النتيجة المحسوبة. تتضمن البرامج هياكل التكرار والاختيار لتمثيل التكرار واتخاذ القرارات لمعالجة قيم الإدخال المتنوعة.

    الهدف التعليمي AAP-2.A: التعبير عن خوارزمية تستخدم التسلسل دون استخدام لغة برمجة. [مهارة 2.A]

    • AAP-2.A.1 الخوارزمية هي مجموعة نهائية من التعليمات تنجز مهمة محددة.
    • AAP-2.A.2 إلى جانب لغات البرمجة المرئية والنصية، يمكن التعبير عن الخوارزميات بطرق متنوعة، مثل اللغة الطبيعية والمخططات والرمز الوهمي (pseudocode).
    • AAP-2.A.3 يتم تنفيذ الخوارزميات التي تعمل بواسطة البرامج باستخدام لغات البرمجة.
    • AAP-2.A.4 يمكن بناء كل خوارزمية باستخدام مزيج من التسلسل، الاختيار، والتكرار.

    الهدف التعليمي AAP-2.B: تمثيل عملية خوارزمية خطوة بخطوة باستخدام جمل كود متسلسلة. [مهارة 2.B]

    • AAP-2.B.1 التسلسل هو تطبيق كل خطوة من خطوات الخوارزمية بالترتيب الذي تظهر به جمل الكود.
    • AAP-2.B.2 جملة الكود هي جزء من كود البرنامج يعبر عن إجراء سيتم تنفيذه.
    • AAP-2.B.3 التعبير يمكن أن يتكون من قيمة، أو متغير، أو عامل، أو استدعاء لإجراء يرجع قيمة.
    • AAP-2.B.4 يتم تقييم التعبيرات لإنتاج قيمة واحدة.
    • AAP-2.B.5 يتبع تقييم التعبيرات ترتيب عمليات محدد بواسطة لغة البرمجة.
    • AAP-2.B.6 الجمل المتسلسلة تُنفذ بالترتيب الذي تظهر فيه في قطعة الكود.
    • AAP-2.B.7 الوضوح وقابلية القراءة اعتبارات مهمة عند التعبير عن خوارزمية بلغة برمجة.

    الهدف التعليمي AAP-2.C: تقييم التعبيرات التي تستخدم العوامل الحسابية. [مهارة 4.B]

    • AAP-2.C.1 العوامل الحسابية جزء من معظم لغات البرمجة وتشمل عوامل الجمع والطرح والضرب والقسمة والباقي (modulus).

    • AAP-2.C.2 توفر ورقة إشارات الامتحان a MOD b، والتي تحسب الباقي عندما يُقسم a على b. افترض أن a عدد صحيح أكبر من أو يساوي 0 وأن b عدد صحيح أكبر من 0. على سبيل المثال، 17 MOD 5 يُحسب ليصبح 2.

    • AAP-2.C.3 توفر ورقة إشارات الامتحان العوامل الحسابية +، -، *، /، وMOD.

      النص والكتلة:

      • a + b
      • a - b
      • a * b
      • a / b
      • a MOD b

      تُستخدم لأداء العمليات الحسابية على a وb. على سبيل المثال، 17 / 5 يُحسب ليصبح 3.4.

    • AAP-2.C.4 ترتيب العمليات المستخدم في الرياضيات يطبق عند تقييم التعبيرات. العامل MOD له نفس الأولوية للعاملين * و/.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Programs compute with the operators +, -, *, /, and MOD (the remainder 余数 of a division, e.g. 17 MOD 5 is 2). Expressions follow the usual order of operations. MOD is especially useful for testing divisibility (n MOD 2 = 0 means n is even) and for wrapping values around a range.

    العربية

    الحسابات البرمجية تقوم بالعمليات باستخدام المعاملات +، -، *، /، و MOD (باقي عملية القسمة، مثال: 17 MOD 5 هو 2). تعقب التعبيرات ترتيب العمليات المعتاد. MOD مفيد بشكل خاص لاختبار قابلية القسمة (n MOD 2 = 0 يعني أن n عدد زوجي) ولإعادة تدوير القيم ضمن نطاق معين.

    Explore · ⁨استكشف⁩

    Evaluate an expression step by step · ⁨تقييم تعبير خطوة بخطوة⁩

    An expression is evaluated with order of operations: multiplication and division happen before addition and subtraction, left to right. · ⁨يتم تقييم التعبير بـ ترتيب العمليات: الضرب والقسيم يحدثان قبل الجمع والطرح، من اليسار إلى اليمين.⁩

    3.4

    Strings · ⁨السلاسل النصية⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-2): The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.

    Learning Objective AAP-2.D: Evaluate expressions that manipulate strings. [Skill 4.B]

    • AAP-2.D.1 String concatenation joins together two or more strings end-to-end to make a new string.
    • AAP-2.D.2 A substring is part of an existing string.
    العربية

    فهم دائم (AAP-2): تحدد طريقة ترتيب الجمل ودمجها في البرنامج النتيجة المحسوبة. تتضمن البرامج هياكل التكرار والاختيار لتمثيل التكرار واتخاذ القرارات لمعالجة قيم الإدخال المتنوعة.

    الهدف التعليمي AAP-2.D: تقييم التعبيرات التي تعالج النصوص. [مهارة 4.B]

    • AAP-2.D.1 دمج النصوص يربط نصين أو أكثر معًا طرفًا تلو الآخر لتكوين نص جديد.
    • AAP-2.D.2 النص الجزئي هو جزء من نص موجود مسبقًا.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    A string 字符串 is an ordered sequence of characters, like "hello". Programs join strings (concatenation 拼接) and find their length. Strings represent text – names, messages, sequences – and are a common program input and output.

    العربية

    السلسلة (String) هي تسلسل مرتب من الأحرف، مثل "hello". تربط البرامج السلاسل (الدمج) وتجد طولها. تمثل النصوص – الأسماء والرسائل والتسلسلات – وهي مدخلات ومخرجات شائعة للبرامج.

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    string/strɪŋ/ سلسلة نصية
    concatenation/kənˌkætəˈneɪʃn/ الدمج (concatenation)
    Boolean expression/ˈbuːlɪən ekˈspreʃn/ تعبير بولياني
    conditional (selection)/kənˈdɪʃənl/ شرطي (اختيار)
    nested conditional/ˈnestɪd kənˈdɪʃənl/ شرط متداخل
    Iteration (a loop)/ˌɪtəˈreɪʃn/ التكرار (الحلقة)
    infinite loop/ˈɪnfɪnət luːp/ حلقة لا نهائية
    algorithm/ˈælɡərɪθəm/ خوارزمية
    3.5

    Boolean Expressions · ⁨العبارات المنطقية⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-2): The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.

    Learning Objective AAP-2.E: For relationships between two variables, expressions, or values: a. Write expressions using relational operators. [Skill 2.B] b. Evaluate expressions that use relational operators. [Skill 4.B]

    • AAP-2.E.1 A Boolean value is either true or false.

    • AAP-2.E.2 The exam reference sheet provides the following relational operators: =, ≠, >, <, ≥, and ≤.

      Text and Block:

      • a = b
      • a ≠ b
      • a > b
      • a < b
      • a ≥ b
      • a ≤ b

      These are used to test the relationship between two variables, expressions, or values. A comparison using a relational operator evaluates to a Boolean value. For example, a = b evaluates to true if a and b are equal; otherwise, it evaluates to false.

    Learning Objective AAP-2.F: For relationships between Boolean values: a. Write expressions using logical operators. [Skill 2.B] b. Evaluate expressions that use logic operators. [Skill 4.B]

    • AAP-2.F.1 The exam reference sheet provides the logical operators NOT, AND, and OR, which evaluate to a Boolean value.

    • AAP-2.F.2 The exam reference sheet provides

      Text:

      NOT condition

      Block:

      NOT condition

      which evaluates to true if condition is false; otherwise it evaluates to false.

    • AAP-2.F.3 The exam reference sheet provides

      Text:

      condition1 AND condition2

      Block:

      condition1 AND condition2

      which evaluates to true if both condition1 and condition2 are true; otherwise it evaluates to false.

    • AAP-2.F.4 The exam reference sheet provides

      Text:

      condition1 OR condition2

      Block:

      condition1 OR condition2

      which evaluates to true if condition1 is true or if condition2 is true or if both condition1 and condition2 are true; otherwise it evaluates to false.

    • AAP-2.F.5 The operand for a logical operator is either a Boolean expression or a single Boolean value.

    العربية

    فهم دائم (AAP-2): تحدد طريقة ترتيب الجمل ودمجها في البرنامج النتيجة المحسوبة. تتضمن البرامج هياكل التكرار والاختيار لتمثيل التكرار واتخاذ القرارات لمعالجة قيم الإدخال المتنوعة.

    الهدف التعليمي AAP-2.E: بالنسبة للعلاقات بين متغيرين أو تعبيران أو قيمتين: أ. اكتب تعبيرات باستخدام عوامل العلاقة. [مهارة 2.B] ب. قيّم التعبيرات التي تستخدم عوامل العلاقة. [مهارة 4.B]

    • AAP-2.E.1 القيمة المنطقية إما صحيحة (true) أو خاطئة (false).

    • AAP-2.E.2 توفر ورقة إشارات الامتحان عوامل العلاقة التالية: =، ≠، >، <، ≥، و≤.

      النص والكتلة:

      • a = b
      • a ≠ b
      • a > b
      • a < b
      • a ≥ b
      • a ≤ b

      تُستخدم لاختبار العلاقة بين متغيرين أو تعبيران أو قيمتين. التقييم باستخدام عامل علاقة ينتج قيمة منطقية. على سبيل المثال، a = b يُحسب ليصبح true إذا كان a وb متساويين؛ وإلا فإنه يُحسب ليصبح false.

    الهدف التعليمي AAP-2.F: بالنسبة للعلاقات بين القيم المنطقية: أ. اكتب تعبيرات باستخدام العوامل المنطقية. [مهارة 2.B] ب. قيّم التعبيرات التي تستخدم عوامل المنطق. [مهارة 4.B]

    • AAP-2.F.1 توفر ورقة إشارات الامتحان العوامل المنطقية NOT، AND، وOR، والتي تُحسب لتنتج قيمة منطقية.

    • AAP-2.F.2 توفر ورقة إشارات الامتحان

      النص:

      NOT condition

      الكتلة:

      NOT condition

      والذي يُحسب ليصبح true إذا كان condition false؛ وإلا فإنه يُحسب ليصبح false.

    • AAP-2.F.3 توفر ورقة إشارات الامتحان

      النص:

      condition1 AND condition2

      الكتلة:

      condition1 AND condition2

      والتي تُعطي true إذا كان كل من condition1 وcondition2 true؛ وإلا فإنها تُعطي false.

    • AAP-2.F.4 يوفر ورقة مرجع الامتحان

      النص:

      condition1 OR condition2

      الكتلة:

      condition1 OR condition2

      والتي تُعطي true إذا كان condition1 true أو إذا كان condition2 true أو إذا كان كل من condition1 وcondition2 true؛ وإلا فإنها تُعطي false.

    • AAP-2.F.5 المعامل لعملية منطقية هو إما تعبير منطقي أو قيمة منطقية واحدة.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    A Boolean expression 布尔表达式 evaluates to true or false. It uses relational operators (=, ≠, <, >, ≤, ≥) and logical operators NOT, AND, OR:

    • NOT reverses a value,
    • AND is true only when both sides are true,
    • OR is true when at least one side is true.

    These conditions drive every decision and loop.

    العربية

    التعبير المنطقي يُقيم إلى true أو false. يستخدم المعاملات النسبية (=، ≠، <، >، ≤، ≥) والمعاملات المنطقية NOT، AND، OR:

    عائلات المعاملات الثلاث: الحسابية، العلائقية، والمنطقية
    عائلات المعاملات الثلاث: الحسابية، العلائقية، والمنطقية
    • NOT يعكس قيمة,
    • AND يكون صحيحًا فقط عندما يكون كلا الجانبين صحيحين,
    • OR تكون صحيحة عندما يكون على الأقل طرف واحد صحيحاً.

    هذه الشروط تقود كل قرار وحلقة تكرار.

    Explore · ⁨استكشف⁩

    Try the OR truth table · ⁨جرب جدول الحقيقة OR⁩

    A Boolean expression is either true (1) or false (0). OR is true when at least one input is true; flip the inputs to see every case. · ⁨التعبير المنطقي يكون إما صحيحًا (1) أو خاطئًا (0). OR تكون صحيحة عندما يدخل واحد على الأقل تكون صحيحة؛ عكس المدخلات لرؤية كل حالة.⁩

    3.6

    Conditionals · ⁨الشرطيات⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-2): The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.

    Learning Objective AAP-2.G: Express an algorithm that uses selection without using a programming language. [Skill 2.A]

    • AAP-2.G.1 Selection determines which parts of an algorithm are executed based on a condition being true or false.

    Learning Objective AAP-2.H: For selection: a. Write conditional statements. [Skill 2.B] b. Determine the result of conditional statements. [Skill 4.B]

    • AAP-2.H.1 Conditional statements, or "if-statements," affect the sequential flow of control by executing different statements based on the value of a Boolean expression.

    • AAP-2.H.2 The exam reference sheet provides

      Text:

      IF(condition) { <block of statements> }

      Block:

      IF condition block of statements

      in which the code in block of statements is executed if the Boolean expression condition evaluates to true; no action is taken if condition evaluates to false.

    • AAP-2.H.3 The exam reference sheet provides

      Text:

      IF(condition) { <first block of statements> } ELSE { <second block of statements> }

      Block:

      IF condition first block of statements ELSE second block of statements

      in which the code in first block of statements is executed if the Boolean expression condition evaluates to true; otherwise, the code in second block of statements is executed.

    العربية

    فهم دائم (AAP-2): تحدد طريقة ترتيب الجمل ودمجها في البرنامج النتيجة المحسوبة. تتضمن البرامج هياكل التكرار والاختيار لتمثيل التكرار واتخاذ القرارات لمعالجة قيم الإدخال المتنوعة.

    الهدف التعليمي AAP-2.G: صغ خوارزمية تستخدم الاختيار دون استخدام لغة برمجة. [مهارة 2.A]

    • AAP-2.G.1 الاختيار يحدد أي أجزاء الخوارزمية يتم تنفيذها بناءً على أن يكون شرط ما true أو false.

    الهدف التعليمي AAP-2.H: للاختيار: أ. اكتب جمل شرطية. [مهارة 2.B] ب. حدد نتيجة الجمل الشرطية. [مهارة 4.B]

    • AAP-2.H.1 الجمل الشرطية، أو "جمل if"، تؤثر على التدفق التسلسلي للتحكم عن طريق تنفيذ جمل مختلفة بناءً على قيمة تعبير منطقي.

    • AAP-2.H.2 يوفر ورقة مرجع الامتحان

      النص:

      IF(condition) { <block of statements> }

      الكتلة:

      IF condition block of statements

      حيث يتم تنفيذ الكود في block of statements إذا كانت القيمة المنطقية condition تُعطي true؛ ولا يُتخذ إجراء إذا كانت condition تُعطي false.

    • AAP-2.H.3 يوفر ورقة مرجع الامتحان

      النص:

      IF(condition) { <first block of statements> } ELSE { <second block of statements> }

      الكتلة:

      IF condition first block of statements ELSE second block of statements

      حيث يتم تنفيذ الكود في first block of statements إذا كانت القيمة المنطقية condition تُعطي true؛ وإلا، يتم تنفيذ الكود في second block of statements.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    A conditional (selection) 条件语句 chooses which code to run. IF runs a block only when its condition is true; ELSE gives an alternative:

    العربية

    الشرطية (الاختيار) تختار أي كود سيتم تشغيله. IF يشغل كتلة فقط عندما يكون شرطها صحيحًا؛ ELSE يعطي بديلاً:

    الاختيار بين مسارات بناءً على شرط
    الاختيار يختار بين المسارات بناءً على شرط
    IF (score ≥ 60)
    {
        DISPLAY("Pass")
    }
    ELSE
    {
        DISPLAY("Fail")
    }
    
    Explore · ⁨استكشف⁩

    Follow an if / else decision · ⁨اتباع قرار if / else⁩

    A conditional runs one branch or another depending on whether its condition is true. Slide the value across the threshold and watch which branch is taken. · ⁨الشرطية تنفذ فرعًا آخر اعتمادًا على ما إذا كانت شرطها صحيحًا. اسحب القيمة عبر العتبة وشاهد أي فرع تم اتخاذه.⁩

    3.7

    Nested Conditionals · ⁨الشرطيات المتداخلة⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-2): The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.

    Learning Objective AAP-2.I: For nested selection: a. Write nested conditional statements. [Skill 2.B] b. Determine the result of nested conditional statements. [Skill 4.B]

    • AAP-2.I.1 Nested conditional statements consist of conditional statements within conditional statements.
    العربية

    فهم دائم (AAP-2): تحدد طريقة ترتيب الجمل ودمجها في البرنامج النتيجة المحسوبة. تتضمن البرامج هياكل التكرار والاختيار لتمثيل التكرار واتخاذ القرارات لمعالجة قيم الإدخال المتنوعة.

    الهدف التعليمي AAP-2.I: للاختيار المتداخل: أ. اكتب جمل شرطية متداخلة. [مهارة 2.B] ب. حدد نتيجة الجمل الشرطية المتداخلة. [مهارة 4.B]

    • AAP-2.I.1 الجمل الشرطية المتداخلة تتكون من جمل شرطية داخل جمل شرطية أخرى.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    A nested conditional 嵌套条件 places one IF inside another (or chains ELSE IF) to choose among more than two paths. Only the first matching branch runs:

    العربية

    الشرطية المتداخلة تضع IF واحدة داخل أخرى (أو تشابك ELSE IF) للاختيار بين أكثر من اثنين من المسارات. يتم تشغيل الفرع الأول المتطابق فقط:

    IF (g ≥ 90)      { grade ← "A" }
    ELSE IF (g ≥ 80) { grade ← "B" }
    ELSE             { grade ← "C" }
    
    3.8

    Iteration · ⁨التكرار⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-2): The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.

    Learning Objective AAP-2.J: Express an algorithm that uses iteration without using a programming language. [Skill 2.A]

    • AAP-2.J.1 Iteration is a repeating portion of an algorithm. Iteration repeats a specified number of times or until a given condition is met.

    Learning Objective AAP-2.K: For iteration: a. Write iteration statements. [Skill 2.B] b. Determine the result or side effect of iteration statements. [Skill 4.B]

    • AAP-2.K.1 Iteration statements change the sequential flow of control by repeating a set of statements zero or more times, until a stopping condition is met.

    • AAP-2.K.2 The exam reference sheet provides

      Text:

      REPEAT n TIMES { <block of statements> }

      Block:

      REPEAT n TIMES block of statements

      in which the block of statements is executed n times.

    • AAP-2.K.3 The exam reference sheet provides

      Text:

      REPEAT UNTIL(condition) { <block of statements> }

      Block:

      REPEAT UNTIL condition block of statements

      in which the code in block of statements is repeated until the Boolean expression condition evaluates to true.

    • AAP-2.K.4 In REPEAT UNTIL(condition) iteration, an infinite loop occurs when the ending condition will never evaluate to true.

    • AAP-2.K.5 In REPEAT UNTIL(condition) iteration, if the conditional evaluates to true initially, the loop body is not executed at all, due to the condition being checked before the loop.

    العربية

    فهم دائم (AAP-2): تحدد طريقة ترتيب الجمل ودمجها في البرنامج النتيجة المحسوبة. تتضمن البرامج هياكل التكرار والاختيار لتمثيل التكرار واتخاذ القرارات لمعالجة قيم الإدخال المتنوعة.

    الهدف التعليمي AAP-2.J: صغ خوارزمية تستخدم التكرار دون استخدام لغة برمجة. [مهارة 2.A]

    • AAP-2.J.1 التكرار هو جزء متكرر من الخوارزمية. يتكرر التكرار عدد محدد من المرات أو حتى يتحقق شرط معين.

    الهدف التعليمي AAP-2.K: للتكرار: أ. اكتب جمل تكرار. [مهارة 2.B] ب. حدد النتيجة أو الأثر الجانبي لجمل التكرار. [مهارة 4.B]

    • AAP-2.K.1 جمل التكرار تغير التدفق التسلسلي للتحكم عن طريق تكرار مجموعة من الجمل صفراً أو أكثر من المرات، حتى يتحقق شرط التوقف.

    • AAP-2.K.2 يوفر ورقة مرجع الامتحان

      النص:

      REPEAT n TIMES { <block of statements> }

      الكتلة:

      REPEAT n TIMES block of statements

      حيث يتم تنفيذ block of statements n مرة.

    • AAP-2.K.3 يوفر ورقة مرجع الامتحان

      النص:

      REPEAT UNTIL(condition) { <block of statements> }

      الكتلة:

      REPEAT UNTIL condition block of statements

      حيث يتم تكرار الكود في block of statements حتى تُعطي القيمة المنطقية condition true.

    • AAP-2.K.4 في REPEAT UNTIL(condition) تكرار، يحدث حلقة لا نهائية عندما لن تتحقق أبداً الشرط النهائي لـ true.

    • AAP-2.K.5 في تكرار REPEAT UNTIL(condition)، إذا كانت القيمة الشرطية تساوي true مبدئياً، فلن يتم تنفيذ جسم الحلقة على الإطلاق، بسبب فحص الشرط قبل الحلقة.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Iteration (a loop) 迭代 repeats instructions. AP pseudocode has two forms:

    A loop that never meets its stopping condition is an infinite loop 无限循环.

    العربية

    التكرار (حلقة تكرار) يعيد التعليمات. الرمز الوهمي لـ AP له شكلان:

    حلقة precondition (WHILE) تختبر قبل الجسم، لذا قد لا تعمل مطلقاً
    حلقة الشرط المسبق (WHILE) تختبر قبل الجسم، لذا قد تعمل أصفار مرة
    REPEAT 5 TIMES        // a fixed count
    {
        DISPLAY("hi")
    }
    
    REPEAT UNTIL (found)  // until a condition becomes true
    {
        ...
    }
    

    حلقة لا تلبي أبداً شرط التوقف الخاص بها هي حلقة لا نهائية.

    Explore · ⁨استكشف⁩

    Trace a loop one pass at a time · ⁨تتبع حلقة مرورًا بمرور⁩

    A loop repeats a block while its counter runs through a range. Step through to watch the counter and the running total update each pass. · ⁨الحلقة تكرر كتلة بينما عددها يمر عبر نطاق. انتقل خطوة بخطوة لمشاهدة العداد والمجموع الكلي يتحدّثان في كل مرور.⁩

    3.9

    Developing Algorithms · ⁨تطوير الخوارزميات⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-2): The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.

    Learning Objective AAP-2.L: Compare multiple algorithms to determine if they yield the same side effect or result. [Skill 1.D]

    • AAP-2.L.1 Algorithms can be written in different ways and still accomplish the same tasks.
    • AAP-2.L.2 Algorithms that appear similar can yield different side effects or results.
    • AAP-2.L.3 Some conditional statements can be written as equivalent Boolean expressions.
    • AAP-2.L.4 Some Boolean expressions can be written as equivalent conditional statements.
    • AAP-2.L.5 Different algorithms can be developed or used to solve the same problem.

    Learning Objective AAP-2.M: For algorithms: a. Create algorithms. [Skill 2.A] b. Combine and modify existing algorithms. [Skill 2.B]

    • AAP-2.M.1 Algorithms can be created from an idea, by combining existing algorithms, or by modifying existing algorithms.
    • AAP-2.M.2 Knowledge of existing algorithms can help in constructing new ones. Some existing algorithms include:
      • determining the maximum or minimum value of two or more numbers
      • computing the sum or average of two or more numbers
      • identifying if an integer is or is not evenly divisible by another integer
      • determining a robot's path through a maze
    • AAP-2.M.3 Using existing correct algorithms as building blocks for constructing another algorithm has benefits such as reducing development time, reducing testing, and simplifying the identification of errors.
    العربية

    فهم دائم (AAP-2): تحدد طريقة ترتيب الجمل ودمجها في البرنامج النتيجة المحسوبة. تتضمن البرامج هياكل التكرار والاختيار لتمثيل التكرار واتخاذ القرارات لمعالجة قيم الإدخال المتنوعة.

    الهدف التعليمي AAP-2.L: قارن بين عدة خوارزميات لتحديد ما إذا كانت تُنتج نفس الأثر الجانبي أو النتيجة. [مهارة 1.D]

    • AAP-2.L.1 يمكن كتابة الخوارزميات بطرق مختلفة ولا تزال تحقق نفس المهام.
    • AAP-2.L.2 الخوارزميات التي تبدو متشابهة قد تُنتج آثاراً جانبية أو نتائج مختلفة.
    • AAP-2.L.3 يمكن كتابة بعض الجمل الشرطية كتعبيرات منطقية مكافئة.
    • AAP-2.L.4 يمكن كتابة بعض التعبيرات المنطقية كجمل شرطية مكافئة.
    • AAP-2.L.5 يمكن تطوير أو استخدام خوارزميات مختلفة لحل نفس المشكلة.

    الهدف التعليمي AAP-2.M: للخوارزميات: أ. أنشئ خوارزميات. [مهارة 2.A] ب. ادمج وعدّل خوارزميات موجودة. [مهارة 2.B]

    • AAP-2.M.1 يمكن إنشاء الخوارزميات من فكرة، أو بدمج خوارزميات موجودة، أو بتعديل خوارزميات موجودة.
    • AAP-2.M.2 معرفة الخوارزميات الموجودة يمكن أن تساعد في بناء خوارزميات جديدة. تشمل بعض الخوارزميات الموجودة:
      • تحديد القيمة القصوى أو الدنيا لعدد أو أكثر من الأرقام
      • حساب مجموع أو متوسط عدد أو أكثر من الأرقام
      • تحديد ما إذا كان عدد صحيح يقبل القسمة بشكل كامل على عدد صحيح آخر أم لا
      • تحديد مسار روبوت عبر متاهة
    • AAP-2.M.3 استخدام خوارزميات صحيحة موجودة ككتل بناء لبناء خوارزمية أخرى له فوائد مثل تقليل وقت التطوير، وتقليل الاختبار، وتبسيط تحديد الأخطاء.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    An algorithm is not the same thing as code. Beyond visual and textual programming languages, an algorithm can be expressed in a variety of ways: in natural language (ordinary sentences), as a diagram such as a flowchart, or in pseudocode. Those forms are for people — they let you check the logic and agree on it before any language is chosen, and the same algorithm can then be written in any language.

    When you do write it in a programming language, clarity and readability are important considerations, not decoration: meaningful variable names, consistent indentation and comments explaining why rather than what. The program has to be read and modified later by someone — often you — and an algorithm nobody can follow cannot be maintained or debugged.

    An algorithm 算法 is a finite sequence of steps that solves a problem, built from sequencing, selection, and iteration. Different algorithms can solve the same problem, and you should be able to combine and modify existing algorithms (for example, count the values in a list that meet a condition, or find the largest). Trace an algorithm by hand to check it is correct.

    العربية
    كود مصدر بايثون على شاشة — الخوارزميات تعليمات دقيقة ومنظمة
    كود مصدر بايثون على شاشة — الخوارزميات تعليمات دقيقة ومنظمة

    الخوارزمية ليست نفس الكود. إلى جانب لغات البرمجة المرئية والنصية، يمكن التعبير عن الخوارزمية بـ طرق متنوعة: في اللغة الطبيعية (جمل عادية)، أو كـ رسم تخطيطي مثل المخطط الانسيابي، أو باستخدام الكود الوهمي. هذه الأشكال مخصصة للبشر — فهي تسمح لك بفحص المنطق والتوافق عليه قبل اختيار أي لغة، ويمكن بعد ذلك كتابة نفس الخوارزمية بأي لغة.

    عند كتابتها بلغة برمجة، الوضوح والقابلية للقراءة اعتبارات مهمة، وليست مجرد زينة: أسماء متغيرات ذات معنى، مسافات بادئة متناسقة، وتعليقات تشرح لماذا بدلاً من ماذا. يجب أن يُقرأ البرنامج ويُعدّل لاحقاً بواسطة شخص آخر — وغالباً أنت — ولا يمكن صيانة خوارزمية لا أحد يتبعها أو إصلاح أخطاءها.

    الخوارزمية هي تسلسل محدود من الخطوات يحل مشكلة، مبنية من التسلسل، والاختيار، والتكرار. يمكن لخوارزميات مختلفة حل نفس المشكلة، ويجب أن تكون قادراً على دمج وتعديل الخوارزميات الموجودة (على سبيل المثال، عد القيم في قائمة تحقق من شرط معين، أو ابحث عن الأكبر). تتبع الخوارزمية يدوياً للتحقق من صحتها.

    المخطط الانسيابي يعرض خوارزمية باستخدام الرموز القياسية
    المخطط الانسيابي يعرض خوارزمية باستخدام الرموز القياسية
    3.10

    Lists · ⁨القوائم⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-2): The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.

    Learning Objective AAP-2.N: For list operations: a. Write expressions that use list indexing and list procedures. [Skill 2.B] b. Evaluate expressions that use list indexing and list procedures. [Skill 4.B]

    • AAP-2.N.1 The exam reference sheet provides basic operations on lists, including:
      • accessing an element by index

        Text:

        aList[i]

        Block:

        aList i

        accesses the element of aList at index i. The first element of aList is at index 1 and is accessed using the notation aList[1].

      • assigning a value of an element of a list to a variable

        Text:

        x ← aList[i]

        Block:

        x ← aList i

        assigns the value of aList[i] to the variable x.

      • assigning a value to an element of a list

        Text:

        aList[i] ← x

        Block:

        aList i ← x

        assigns the value of x to aList[i].

        Text:

        aList[i] ← aList[j]

        Block:

        aList i ← aList j

        assigns the value of aList[j] to aList[i].

      • inserting elements at a given index

        Text:

        INSERT(aList, i, value)

        Block:

        INSERT aList, i, value

        shifts to the right any values in aList at indices greater than or equal to i. The length of the list is increased by 1, and value is placed at index i in aList.

      • adding elements to the end of the list

        Text:

        APPEND(aList, value)

        Block:

        APPEND aList, value

        increases the length of aList by 1, and value is placed at the end of aList.

      • removing elements

        Text:

        REMOVE(aList, i)

        Block:

        REMOVE aList, i

        removes the item at index i in aList and shifts to the left any values at indices greater than i. The length of aList is decreased by 1.

      • determining the length of a list

        Text:

        LENGTH(aList)

        Block:

        LENGTH aList

        evaluates to the number of elements currently in aList.

    • AAP-2.N.2 List procedures are implemented in accordance with the syntax rules of the programming language.

    Learning Objective AAP-2.O: For algorithms involving elements of a list: a. Write iteration statements to traverse a list. [Skill 2.B] b. Determine the result of an algorithm that includes list traversals. [Skill 4.B]

    • AAP-2.O.1 Traversing a list can be a complete traversal, where all elements in the list are accessed, or a partial traversal, where only a portion of elements are accessed.

      • Exclusion statement (EK AAP-2.O.1): Traversing multiple lists at the same time using the same index for both (parallel traversals) is outside the scope of this course and the AP Exam.
    • AAP-2.O.2 Iteration statements can be used to traverse a list.

    • AAP-2.O.3 The exam reference sheet provides

      Text:

      FOR EACH item IN aList { <block of statements> }

      Block:

      FOR EACH item IN aList block of statements

      The variable item is assigned the value of each element of aList sequentially, in order, from the first element to the last element. The code in block of statements is executed once for each assignment of item.

    • AAP-2.O.4 Knowledge of existing algorithms that use iteration can help in constructing new algorithms. Some examples of existing algorithms that are often used with lists include:

      • determining a minimum or maximum value in a list
      • computing a sum or average of a list of numbers
    • AAP-2.O.5 Linear search or sequential search algorithms check each element of a list, in order, until the desired value is found or all elements in the list have been checked.

    العربية

    فهم دائم (AAP-2): تحدد طريقة ترتيب الجمل ودمجها في البرنامج النتيجة المحسوبة. تتضمن البرامج هياكل التكرار والاختيار لتمثيل التكرار واتخاذ القرارات لمعالجة قيم الإدخال المتنوعة.

    هدف التعلم AAP-2.N: بالنسبة لعمليات القائمة: أ. اكتب تعبيرات تستخدم فهرسة القوائم وإجراءات القائمة. [مهارة 2.B] ب. قيّم تعبيرات تستخدم فهرسة القوائم وإجراءات القائمة. [مهارة 4.B]

    • AAP-2.N.1 توفر ورقة مرجع الامتحان عمليات أساسية على القوائم، بما في ذلك:
      • الوصول إلى عنصر بواسطة الفهرس

        النص:

        aList[i]

        الكتلة:

        aList i

        يصل إلى عنصر aList عند الفهرس i. العنصر الأول من aList موجود عند الفهرس 1 ويتم الوصول إليه باستخدام التدوين aList[1].

      • إسناد قيمة عنصر من القائمة إلى متغير

        النص:

        x ← aList[i]

        الكتلة:

        x ← aList i

        يُسند قيمة aList[i] إلى المتغير x.

      • إسناد قيمة لعنصر من القائمة

        النص:

        aList[i] ← x

        الكتلة:

        aList i ← x

        يُسند قيمة x إلى aList[i].

        النص:

        aList[i] ← aList[j]

        الكتلة:

        aList i ← aList j

        يُسند قيمة aList[j] إلى aList[i].

      • إدخال عناصر عند فهرس معين

        النص:

        INSERT(aList, i, value)

        الكتلة:

        INSERT aList, i, value

        يحرك إلى اليمين أي قيم في aList عند الفهارس الأكبر من أو تساوي i. تزداد طول القائمة بمقدار 1، ويوضع value عند الفهرس i في aList.

      • إضافة عناصر إلى نهاية القائمة

        النص:

        APPEND(aList, value)

        الكتلة:

        APPEND aList, value

        يزيد طول aList بمقدار 1، ويوضع value في نهاية aList.

      • إزالة العناصر

        النص:

        REMOVE(aList, i)

        الكتلة:

        REMOVE aList, i

        يزيل العنصر عند الفهرس i في aList ويحرك إلى اليسار أي قيم عند الفهارس الأكبر من i. ينقص طول aList بمقدار 1.

      • تحديد طول القائمة

        النص:

        LENGTH(aList)

        الكتلة:

        LENGTH aList

        يُقيّم إلى عدد العناصر الموجودة حالياً في aList.

    • AAP-2.N.2 تُنفذ إجراءات القائمة وفقاً لقواعد بناء لغة البرمجة.

    هدف التعلم AAP-2.O: بالنسبة للخوارزميات التي تتضمن عناصر القائمة: أ. اكتب جمل تكرار للمرور عبر القائمة. [مهارة 2.B] ب. حدد نتيجة خوارزمية تتضمن مروراً بالقائمة. [مهارة 4.B]

    • AAP-2.O.1 يمكن أن يكون المرور عبر القائمة مروراً كاملاً، حيث يتم الوصول إلى جميع العناصر في القائمة، أو مروراً جزئياً، حيث يتم الوصول فقط إلى جزء من العناصر.

      • عبارة الاستبعاد (EK AAP-2.O.1): المرور عبر عدة قوائم في نفس الوقت باستخدام نفس الفهرس لكليهما (المرور المتوازي) خارج نطاق هذا المقرر وامتحان AP.
    • AAP-2.O.2 يمكن استخدام جمل التكرار للمرور عبر القائمة.

    • AAP-2.O.3 توفر ورقة مرجع الامتحان

      النص:

      FOR EACH item IN aList { <block of statements> }

      الكتلة:

      FOR EACH item IN aList block of statements

      يتم إسناد المتغير item قيمة كل عنصر من aList على التوالي، بالترتيب، من العنصر الأول إلى العنصر الأخير. يتم تنفيذ الكود في block of statements مرة واحدة لكل إسناد لـ item.

    • AAP-2.O.4 معرفة الخوارزميات الحالية التي تستخدم التكرار يمكن أن تساعد في بناء خوارزميات جديدة. أمثلة على الخوارزميات الحالية التي غالباً ما تُستخدم مع القوائم تشمل:

      • تحديد قيمة دنيا أو عليا في قائمة
      • حساب مجموع أو متوسط قائمة من الأرقام
    • AAP-2.O.5 خوارزميات البحث الخطي أو المتتابع تتحقق من كل عنصر من عناصر القائمة، بالترتيب، حتى يتم العثور على القيمة المطلوبة أو يتم التحقق من جميع العناصر في القائمة.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    A list 列表 is an ordered collection of values under one name, the course's key data abstraction. AP pseudocode indexes from 1:

    Traverse a list with a loop to sum, count, search, or find a maximum:

    العربية

    القائمة هي مجموعة مرتبة من القيم تحت اسم واحد، وهي التجريد الأساسي للبيانات في المسار. كود بايثون الوهمي للمناهج المتقدمة (AP) يبدأ الفهرسة من 1:

    القائمة تحتفظ بالعديد من القيم في متغير واحد، يتم الوصول إليها عبر فهرسها
    القائمة تحتفظ بالعديد من القيم في متغير واحد، يتم الوصول إليها عبر فهرسها
    scores ← [88, 74, 95]
    DISPLAY(scores[1])          // 88
    scores[2] ← 80              // replace the 2nd value
    APPEND(scores, 60)          // add to the end
    INSERT(scores, 1, 100)      // insert at index 1
    REMOVE(scores, 3)           // delete the 3rd element
    LENGTH(scores)              // how many elements
    

    تتصفح القائمة بحلقة تكرارية لجمعها، أو عدّها، أو البحث فيها، أو إيجاد قيمتها القصوى:

    FOR EACH x IN scores
    {
        total ← total + x
    }
    
    3.11

    Binary Search · ⁨البحث الثنائي⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-2): The way statements are sequenced and combined in a program determines the computed result. Programs incorporate iteration and selection constructs to represent repetition and make decisions to handle varied input values.

    Learning Objective AAP-2.P: For binary search algorithms: a. Determine the number of iterations required to find a value in a data set. [Skill 1.D] b. Explain the requirements necessary to complete a binary search. [Skill 1.A]

    • AAP-2.P.1 The binary search algorithm starts at the middle of a sorted data set of numbers and eliminates half of the data; this process repeats until the desired value is found or all elements have been eliminated.
      • Exclusion statement (EK AAP-2.P.1): Specific implementations of the binary search are outside the scope of the course and the AP Exam.
    • AAP-2.P.2 Data must be in sorted order to use the binary search algorithm.
    • AAP-2.P.3 Binary search is often more efficient than sequential/linear search when applied to sorted data.
    العربية

    فهم دائم (AAP-2): تحدد طريقة ترتيب الجمل ودمجها في البرنامج النتيجة المحسوبة. تتضمن البرامج هياكل التكرار والاختيار لتمثيل التكرار واتخاذ القرارات لمعالجة قيم الإدخال المتنوعة.

    هدف التعلم AAP-2.P: بالنسبة لخوارزميات البحث الثنائي: أ. حدد عدد التكرارات اللازمة لإيجاد قيمة في مجموعة بيانات. [مهارة 1.D] ب. اشرح المتطلبات اللازمة لإكمال البحث الثنائي. [مهارة 1.A]

    • AAP-2.P.1 تبدأ خوارزمية البحث الثنائي من منتصف مجموعة بيانات مرتبة من الأرقام وتستبعد نصف البيانات؛ تتكرر هذه العملية حتى يتم العثور على القيمة المطلوبة أو يتم استبعاد جميع العناصر.
      • عبارة الاستبعاد (EK AAP-2.P.1): التنفيذات المحددة للبحث الثنائي خارج نطاق المقرر وامتحان AP.
    • AAP-2.P.2 يجب أن تكون البيانات مرتبة لاستخدام خوارزمية البحث الثنائي.
    • AAP-2.P.3 يكون البحث الثنائي أكثر كفاءة غالباً من البحث المتتابع/الخطي عند تطبيقه على بيانات مرتبة.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Binary search 二分搜索 finds a value in a sorted list far faster than checking each element. It looks at the middle element, then discards the half that cannot contain the target, repeating until found. Each step halves the search space, so a list of $n$ items takes about $\log_2 n$ steps. It requires the data to be sorted first.

    Worked example. Searching a sorted list of $8$ items, binary search halves the range each step: $8\rightarrow4\rightarrow2\rightarrow1$, at most $3$ comparisons ($\log_2 8=3$), whereas a linear search could take up to $8$. The advantage grows explosively: about $1{,}000$ items need only $\approx10$ binary-search steps (but up to $1{,}000$ linear ones), and $1{,}000{,}000$ items need just $\approx20$. Halving is what makes it a reasonable-time algorithm.

    العربية
    دليل الهاتف: البحث الثنائي ينصف الصفحات المتبقية في كل خطوة
    دليل الهاتف: البحث الثنائي ينصف الصفحات المتبقية في كل خطوة

    البحث الثنائي يجد قيمة في قائمة مرتبة بسرعة أكبر بكثير من فحص كل عنصر. ينظر إلى العنصر الأوسط، ثم يتجاهل النصف الذي لا يمكن أن يحتوي على الهدف، متكرراً حتى يتم العثور عليه. في كل خطوة ينقص مساحة البحث بنصفها، لذا فإن قائمة تحتوي على $n$ عناصر تستغرق حوالي $\log_2 n$ خطوات. يتطلب الأمر أن تكون البيانات مرتبة مسبقاً.

    البحث الثنائي ينصف النطاق في كل خطوة (يجب أن تكون القائمة مُرتبة)
    البحث الثنائي ينصف النطاق في كل خطوة (يجب أن تكون القائمة مُرتبة)

    مثال محلول. عند البحث في قائمة مرتبة من $8$ عناصر، يقلل البحث الثنائي النطاق إلى النصف في كل خطوة: $8\rightarrow4\rightarrow2\rightarrow1$، بحد أقصى $3$ مقارنات ($\log_2 8=3$)، بينما قد يستغرق البحث الخطي ما يصل إلى $8$. يتزايد الميزة بشكل انفجاري: حوالي $1{,}000$ عناصر تحتاج فقط إلى $\approx10$ خطوات بحث ثنائي (لكن حتى $1{,}000$ خطوات خطية)، و$1{,}000{,}000$ عناصر تحتاج فقط إلى $\approx20$. التقسيم إلى النصف هو ما يجعله خوارزمية ذات وقت معقول.

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    Binary search/ˈbaɪnəri sɜːtʃ/ البحث الثنائي
    3.12

    Calling Procedures · ⁨استدعاء الإجراءات⁩

    Syllabus · ⁨المنهج⁩
    Enduring UnderstandingLearning ObjectiveEssential Knowledge

    AAP-3
    Programmers break down problems into smaller and more manageable pieces. By creating procedures and leveraging parameters, programmers generalize processes that can be reused. Procedures allow programmers to draw upon existing code that has already been tested, allowing them to write programs more quickly and with more confidence.

    AAP-3.A
    For procedure calls:
    a. Write statements to call procedures. [Skill 3.B]
    b. Determine the result or effect of a procedure call. [Skill 4.B]

    • AAP-3.A.1 A procedure is a named group of programming instructions that may have parameters and return values.

    • AAP-3.A.2 Procedures are referred to by different names, such as method or function, depending on the programming language.

    • AAP-3.A.3 Parameters are input variables of a procedure. Arguments specify the values of the parameters when a procedure is called.

    • AAP-3.A.4 A procedure call interrupts the sequential execution of statements, causing the program to execute the statements within the procedure before continuing. Once the last statement in the procedure (or a return statement) has executed, flow of control is returned to the point immediately following where the procedure was called.

    • AAP-3.A.5 The exam reference sheet provides

      procName(arg1, arg2, ...)

      as a way to call

      Text:

      PROCEDURE procName(parameter1, parameter2, ...) { <block of statements> }

      Block:

      PROCEDURE procName parameter1, parameter2,... block of statements

      which takes zero or more arguments; arg1 is assigned to parameter1, arg2 is assigned to parameter2, and so on.

    • AAP-3.A.6 The exam reference sheet provides the procedure

      Text:

      DISPLAY(expression)

      Block:

      DISPLAY expression

      to display the value of expression, followed by a space.

    • AAP-3.A.7 The exam reference sheet provides the

      Text:

      RETURN(expression)

      Block:

      RETURN expression

      statement, which is used to return the flow of control to the point where the procedure was called and to return the value of expression.

    • AAP-3.A.8 The exam reference sheet provides

      result ← procName(arg1, arg2, ...)

      to assign to result the "value of the procedure" being returned by calling

      Text:

      PROCEDURE procName(parameter1, parameter2, ...) { <block of statements> RETURN(expression) }

      Block:

      PROCEDURE procName parameter1, parameter2,... block of statements RETURN expression

    • AAP-3.A.9 The exam reference sheet provides procedure

      Text:

      INPUT()

      Block:

      INPUT

      which accepts a value from the user and returns the input value.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    A procedure (function) 过程 is a named, reusable block of code. Calling it runs its code with the arguments you supply, and it may return a value:

    Procedures let you use code without knowing its inner workings – procedural abstraction 过程抽象.

    العربية

    الإجراء (الدالة) هو كتلة من الكود قابلة لإعادة الاستخدام ومُعطاة اسماً. عند استدعاؤها، يتم تنفيذ كدها بالـ الحجج التي تقدمها، وقد ترجع قيمة:

    sum ← Add(3, 4)      // call, passing 3 and 4
    

    تسمح الإجراءات باستخدام الكود دون معرفة تفاصيله الداخلي – وهو ما يسمى بـ التجريد الإجرائي.

    3.13

    Developing Procedures · ⁨تطوير الإجراءات⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-3): Programmers break down problems into smaller and more manageable pieces. By creating procedures and leveraging parameters, programmers generalize processes that can be reused. Procedures allow programmers to draw upon existing code that has already been tested, allowing them to write programs more quickly and with more confidence.

    Learning Objective AAP-3.B: Explain how the use of procedural abstraction manages complexity in a program. [Skill 3.C]

    • AAP-3.B.1 One common type of abstraction is procedural abstraction, which provides a name for a process and allows a procedure to be used only knowing what it does, not how it does it.
    • AAP-3.B.2 Procedural abstraction allows a solution to a large problem to be based on the solutions of smaller subproblems. This is accomplished by creating procedures to solve each of the subproblems.
    • AAP-3.B.3 The subdivision of a computer program into separate subprograms is called modularity.
    • AAP-3.B.4 A procedural abstraction may extract shared features to generalize functionality instead of duplicating code. This allows for program code reuse, which helps manage complexity.
    • AAP-3.B.5 Using parameters allows procedures to be generalized, enabling the procedures to be reused with a range of input values or arguments.
    • AAP-3.B.6 Using procedural abstraction helps improve code readability.
    • AAP-3.B.7 Using procedural abstraction in a program allows programmers to change the internals of the procedure (to make it faster, more efficient, use less storage, etc.) without needing to notify users of the change as long as what the procedure does is preserved.

    Learning Objective AAP-3.C: Develop procedural abstractions to manage complexity in a program by writing procedures. [Skill 3.B]

    • AAP-3.C.1 The exam reference sheet provides

      Text:

      PROCEDURE procName(parameter1, parameter2, ...) { <block of statements> }

      Block:

      PROCEDURE procName parameter1, parameter2,... block of statements

      which is used to define a procedure that takes zero or more arguments. The procedure contains block of statements.

    • AAP-3.C.2 The exam reference sheet provides

      Text:

      PROCEDURE procName(parameter1, parameter2, ...) { <block of statements> RETURN(expression) }

      Block:

      PROCEDURE procName parameter1, parameter2,... block of statements RETURN expression

      which is used to define a procedure that takes zero or more arguments. The procedure contains block of statements and returns the value of expression. The RETURN statement may appear at any point inside the procedure and causes an immediate return from the procedure back to the calling statement.

    العربية

    الفهم الدائم (AAP-3): يقوم المبرمجون بتقسيم المشكلات إلى أجزاء أصغر وأكثر قابلية للإدارة. من خلال إنشاء الإجراءات واستغلال المعاملات، يقوم المبرمجون بتعميل العمليات التي يمكن إعادة استخدامها. تسمح الإجراءات للمبرمجين بالاستناد إلى الأكواد الموجودة مسبقًا والتي تم اختبارها بالفعل، مما يتيح لهم كتابة برامج بشكل أسرع ومع ثقة أكبر.

    هدف التعلم AAP-3.B: اشرح كيف أن استخدام التجريد الإجرائي يدير التعقيد في البرنامج. [مهارة 3.C]

    • AAP-3.B.1 أحد الأنواع الشائعة للتجريد هو التجريد الإجرائي، والذي يوفر اسماً لعملية ويُمكّن من استخدام إجراء مع معرفة ما يفعله فقط، دون معرفة كيفية قيامه بذلك.
    • AAP-3.B.2 يسمح التجريد الإجرائي ببناء حل لمشكلة كبيرة على حلول مشاكل فرعية أصغر. يتحقق ذلك من خلال إنشاء إجراءات لحل كل مشكلة فرعية.
    • AAP-3.B.3 يُسمى تقسيم برنامج الحاسوب إلى برامج فرعية منفصلة التعددية (modularity).
    • AAP-3.B.4 قد يستخرج التجريد الإجرائي ميزات مشتركة لتعميل الوظيفة بدلاً من تكرار الكود. هذا يسمح بإعادة استخدام كود البرنامج، مما يساعد في إدارة التعقيد.
    • AAP-3.B.5 استخدام المعاملات يسمح بتعميل الإجراءات، مما يمكنها من إعادة الاستخدام مع مجموعة متنوعة من قيم الإدخال أو الحجج.
    • AAP-3.B.6 يساعد التجريد الإجرائي على تحسين قراءة الكود.
    • AAP-3.B.7 استخدام التجريد الإجرائي في برنامج ما يسمح للمبرمجين بتغيير التفاصيل الداخلية للإجراء (لجعله أسرع، أكثر كفاءة، أو يستهلك ذاكرة أقل، إلخ) دون الحاجة إلى إخبار المستخدمين بالتغير طالما أن ما يقوم به الإجراء يبقى كما هو.

    هدف التعلم AAP-3.C: تطوير التجريدات الإجرائية لإدارة التعقيد في البرنامج عن طريق كتابة الإجراءات. [المهارة 3.B]

    • AAP-3.C.1 توفر ورقة مرجع الامتحان

      النص:

      PROCEDURE procName(parameter1, parameter2, ...) { <block of statements> }

      الكتلة:

      PROCEDURE procName parameter1, parameter2,... block of statements

      والتي تُستخدم لتعريف إجراء يأخذ صفرًا أو أكثر من المعاملات. يحتوي الإجراء على block of statements.

    • AAP-3.C.2 توفر ورقة مرجع الامتحان

      النص:

      PROCEDURE procName(parameter1, parameter2, ...) { <block of statements> RETURN(expression) }

      الكتلة:

      PROCEDURE procName parameter1, parameter2,... block of statements RETURN expression

      والتي تُستخدم لتعريف إجراء يأخذ صفرًا أو أكثر من المعاملات. يحتوي الإجراء على block of statements ويعيد قيمة expression. قد يظهر جملة RETURN في أي مكان داخل الإجراء وتسبب إرجاعًا فوريًا من الإجراء إلى جملة الاستدعاء.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    You define a procedure with a name, parameters (inputs), and a body, and optionally RETURN a result:

    Writing your own procedures reduces repetition, breaks a big problem into named pieces, and makes programs readable and easier to test – the essence of abstraction 抽象.

    العربية

    تُعرّف الإجراء باسم، ومعلمات (مدخلات)، وجسم، وخياراً RETURN النتيجة:

    تجزئة برنامج إلى إجراءات وإجراءات فرعية
    تجزئة برنامج إلى إجراءات وإجراءات فرعية
    PROCEDURE Add(a, b)
    {
        RETURN(a + b)
    }
    

    كتابة إجراءاتك الخاصة يقلل التكرار، ويحل مشكلة كبيرة إلى أجزاء مُسمَّاة، ويجعل البرامج مقروءة وأسهل في الاختبار – وهو جوهر الـ التجريد.

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    procedure (function)/prəˈsiːdʒə/ إجراء (دالة)
    procedural abstraction/prəˈsiːdʒərəl əbˈstrækʃn/ التجريد الإجرائي
    3.14

    Libraries · ⁨المكتبات⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-3): Programmers break down problems into smaller and more manageable pieces. By creating procedures and leveraging parameters, programmers generalize processes that can be reused. Procedures allow programmers to draw upon existing code that has already been tested, allowing them to write programs more quickly and with more confidence.

    Learning Objective AAP-3.D: Select appropriate libraries or existing code segments to use in creating new programs. [Skill 2.B]

    • AAP-3.D.1 A software library contains procedures that may be used in creating new programs.
    • AAP-3.D.2 Existing code segments can come from internal or external sources, such as libraries or previously written code.
    • AAP-3.D.3 The use of libraries simplifies the task of creating complex programs.
    • AAP-3.D.4 Application program interfaces (APIs) are specifications for how the procedures in a library behave and can be used.
    • AAP-3.D.5 Documentation for an API/library is necessary in understanding the behaviors provided by the API/library and how to use them.
    العربية

    الفهم الدائم (AAP-3): يقوم المبرمجون بتقسيم المشكلات إلى أجزاء أصغر وأكثر قابلية للإدارة. من خلال إنشاء الإجراءات واستغلال المعاملات، يقوم المبرمجون بتعميل العمليات التي يمكن إعادة استخدامها. تسمح الإجراءات للمبرمجين بالاستناد إلى الأكواد الموجودة مسبقًا والتي تم اختبارها بالفعل، مما يتيح لهم كتابة برامج بشكل أسرع ومع ثقة أكبر.

    هدف التعلم AAP-3.D: اختيار المكتبات المناسبة أو مقاطع الكود الموجودة مسبقًا لاستخدامها في إنشاء برامج جديدة. [المهارة 2.B]

    • AAP-3.D.1 تحتوي مكتبة البرمجيات على إجراءات يمكن استخدامها في إنشاء برامج جديدة.
    • AAP-3.D.2 يمكن أن تأتي مقاطع الكود الموجودة مسبقًا من مصادر داخلية أو خارجية، مثل المكتبات أو الكود المكتوب سابقًا.
    • AAP-3.D.3 يسهل استخدام المكتبات مهمة إنشاء برامج معقدة.
    • AAP-3.D.4 واجهات برمجة التطبيقات (APIs) هي مواصفات حول كيفية سلوك الإجراءات في المكتبة وكيفية استخدامها.
    • AAP-3.D.5 وثائق API/المكتبة ضرورية لفهم السلوكيات التي توفرها API/المكتبة وكيفية استخدامها.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    A library 库 is a collection of ready-made procedures that others can reuse. An API (Application Program Interface) 应用程序接口 documents what each procedure does, its parameters, and its result – so you can use it without seeing its code. Libraries save time and let you build on existing, tested work.

    The documentation is part of the library. Documentation for an API or library is necessary in order to understand the behaviours it provides and how to use them — what each procedure expects as parameters, what it returns, and what it does at the edges. Without it you would have to read the source, which defeats the point of abstraction; with it you can use a procedure correctly without knowing how it works inside.

    العربية

    المكتبة هي مجموعة من الإجراءات الجاهزة التي يمكن للآخرين إعادة استخدامها. واجهة برمجة التطبيقات (API) تُوثّق ما تفعله كل إجراء، ومعلماتها، ونتيجتها – بحيث يمكنك استخدامها دون رؤية كدها. توفر المكتبات الوقت وتتيح لك البناء على عمل موجود ومختبر مسبقاً.

    التوثيق جزء من المكتبة. توثيق واجهة برمجة التطبيقات أو المكتبة ضروري لفهم السلوكيات التي توفرها وكيفية استخدامها — بما تتوقعه كل إجراء كمعلمات، وما ترديه، وما تفعله في الحالات الحدية. بدونه ستضطر لقراءة المصدر، مما يُلغي غرض التجريد؛ وبوجوده يمكنك استخدام الإجراء بشكل صحيح دون معرفة كيف يعمل داخلياً.

    3.15

    Random Values · ⁨قيم عشوائية⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-3): Programmers break down problems into smaller and more manageable pieces. By creating procedures and leveraging parameters, programmers generalize processes that can be reused. Procedures allow programmers to draw upon existing code that has already been tested, allowing them to write programs more quickly and with more confidence.

    Learning Objective AAP-3.E: For generating random values: a. Write expressions to generate possible values. [Skill 2.B] b. Evaluate expressions to determine the possible results. [Skill 4.B]

    • AAP-3.E.1 The exam reference sheet provides

      Text:

      RANDOM(a, b)

      Block:

      RANDOM a, b

      which generates and returns a random integer from a to b, inclusive. Each result is equally likely to occur. For example, RANDOM(1, 3) could return 1, 2, or 3.

    • AAP-3.E.2 Using random number generation in a program means each execution may produce a different result.

    العربية

    الفهم الدائم (AAP-3): يقوم المبرمجون بتقسيم المشكلات إلى أجزاء أصغر وأكثر قابلية للإدارة. من خلال إنشاء الإجراءات واستغلال المعاملات، يقوم المبرمجون بتعميل العمليات التي يمكن إعادة استخدامها. تسمح الإجراءات للمبرمجين بالاستناد إلى الأكواد الموجودة مسبقًا والتي تم اختبارها بالفعل، مما يتيح لهم كتابة برامج بشكل أسرع ومع ثقة أكبر.

    هدف التعلم AAP-3.E: لإنشاء قيم عشوائية: أ. اكتب تعبيرات لتوليد القيم الممكنة. [المهارة 2.B] ب. قوّم تعبيرات لتحديد النتائج الممكنة. [المهارة 4.B]

    • AAP-3.E.1 توفر ورقة مرجع الامتحان

      النص:

      RANDOM(a, b)

      الكتلة:

      RANDOM a, b

      التي تولد وتعيد عددًا صحيحًا عشوائيًا من a إلى b، بما في ذلك الحدين. كل نتيجة محتملة بنفس احتمالية الحدوث. على سبيل المثال، قد يعيد RANDOM(1, 3) 1 أو 2 أو 3.

    • AAP-3.E.2 يعني استخدام توليد الأرقام العشوائية في البرنامج أن كل تنفيذ قد ينتج نتيجة مختلفة.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    RANDOM(a, b) returns a random integer from a to b (inclusive), letting a program produce unpredictable results – for games, sampling, or simulations. Each call may give a different value, so a program using randomness behaves differently each run.

    العربية

    RANDOM(a, b) يعيد عددًا صحيحًا عشوائيًا من a إلى b (شاملًا)، مما يسمح للبرنامج بإنتاج نتائج غير متوقعة – للألعاب، أو أخذ العينات، أو المحاكيات. قد تعطي كل استدعاء قيمة مختلفة، لذا فإن البرنامج الذي يستخدم العشوائية يتصرف بشكل مختلف في كل مرة يتم تشغيله فيها.

    3.16

    Simulations · ⁨المحاكاة⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-3): Programmers break down problems into smaller and more manageable pieces. By creating procedures and leveraging parameters, programmers generalize processes that can be reused. Procedures allow programmers to draw upon existing code that has already been tested, allowing them to write programs more quickly and with more confidence.

    Learning Objective AAP-3.F: For simulations: a. Explain how computers can be used to represent real-world phenomena or outcomes. [Skill 1.A] b. Compare simulations with real-world contexts. [Skill 1.D]

    • AAP-3.F.1 Simulations are abstractions of more complex objects or phenomena for a specific purpose.
    • AAP-3.F.2 A simulation is a representation that uses varying sets of values to reflect the changing state of a phenomenon.
    • AAP-3.F.3 Simulations often mimic real-world events with the purpose of drawing inferences, allowing investigation of a phenomenon without the constraints of the real world.
    • AAP-3.F.4 The process of developing an abstract simulation involves removing specific details or simplifying functionality.
    • AAP-3.F.5 Simulations can contain bias derived from the choices of real-world elements that were included or excluded.
    • AAP-3.F.6 Simulations are most useful when real-world events are impractical for experiments (e.g., too big, too small, too fast, too slow, too expensive, or too dangerous).
    • AAP-3.F.7 Simulations facilitate the formulation and refinement of hypotheses related to the objects or phenomena under consideration.
    • AAP-3.F.8 Random number generators can be used to simulate the variability that exists in the real world.
    العربية

    الفهم الدائم (AAP-3): يقوم المبرمجون بتقسيم المشكلات إلى أجزاء أصغر وأكثر قابلية للإدارة. من خلال إنشاء الإجراءات واستغلال المعاملات، يقوم المبرمجون بتعميل العمليات التي يمكن إعادة استخدامها. تسمح الإجراءات للمبرمجين بالاستناد إلى الأكواد الموجودة مسبقًا والتي تم اختبارها بالفعل، مما يتيح لهم كتابة برامج بشكل أسرع ومع ثقة أكبر.

    هدف التعلم AAP-3.F: للمحاكيات: أ. اشرح كيف يمكن استخدام الحواسيب لتمثيل ظواهر العالم الحقيقي أو النتائج. [مهارة 1.A] أ. اشرح كيف يمكن استخدام الحواسيب لتمثيل ظواهر العالم الحقيقي أو نتائجها. [مهارة 1.A]

    • AAP-3.F.1 المحاكيات هي تجريدات لأشياء أو ظواهر أكثر تعقيدًا لغرض محدد.
    • AAP-3.F.2 المحاكاة هي تمثيل يستخدم مجموعات متغيرة من القيم لتعكس الحالة المتغيرة لظاهرة ما.
    • AAP-3.F.3 تحاكي المحاكيات غالبًا الأحداث الواقية بهدف استخلاص الاستنتاجات، مما يسمح بالتحقيق في ظاهرة ما دون قيود العالم الحقيقي.
    • AAP-3.F.4 يتضمن عملية تطوير محاكاة مجردة إزالة التفاصيل المحددة أو تبسيط الوظائف.
    • AAP-3.F.5 يمكن أن تحتوي المحاكيات على تحيز مشتق من الخيارات المتعلقة بالعناصر الواقية التي تم تضمينها أو استبعادها.
    • AAP-3.F.6 تكون المحاكيات مفيدة بشكل خاص عندما تكون الأحداث الواقية غير عملية للتجارب (مثل: كبيرة جدًا، صغيرة جدًا، سريعة جدًا، بطيئة جدًا، باهظة الثمن، أو خطيرة).
    • AAP-3.F.7 تسهل المحاكيات صياغة وتحسين الفرضيات المتعلقة بالأشياء أو الظواهر قيد النظر.
    • AAP-3.F.8 يمكن استخدام مولدات الأرقام العشوائية لمحاكاة التباين الموجود في العالم الحقيقي.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    A simulation 模拟 is a program that models a real-world process to study it safely and cheaply. Simulations simplify reality (they leave out detail) and often use randomness to imitate chance events. They let you test scenarios that would be too costly, slow, or dangerous in real life – but their results are only as good as their assumptions.

    A simulation is a way of doing science, not just a picture. Because it can be run many times, cheaply and with one variable changed at a time, a simulation facilitates the formulation and refinement of hypotheses about the object or phenomenon under consideration: you propose an explanation, run the model, compare the result with reality, and adjust either the hypothesis or the model. That is why a simulation's simplifications matter — a result only supports a hypothesis about the real world to the extent that what was left out does not matter.

    العربية

    المحاكاة هي برنامج يحاكي عملية واقعية لدراستها بأمان وبتكلفة منخفضة. تبسّط المحاكاة الواقع (تستبعد التفاصيل) وغالبًا ما تستخدم العشوائية لمحاكاة الأحداث العشوائية. تتيح لك اختبار سيناريوهات قد تكون مكلفة أو بطيئة أو خطيرة في الحياة الحقيقية – لكن نتائجها لا تفوق جودة افتراضاتها.

    المحاكاة طريقة لإجراء العلم، وليست مجرد صورة. لأنها يمكن تشغيلها مراراً وتكراراً، بتكلفة منخفضة changing متغير واحد في كل مرة، فإن المحاكاة تيسّغ صياغة وتحسين الفرضيات حول الشيء أو الظاهرة قيد النظر: تقترح شرحاً، وتشغل النموذج، وتقارن النتيجة بالواقع، وتعدل إما الفرضية أو النموذج. ولهذا السبب تُعد تبسيطات المحاكاة مهمة — فالنتيجة تدعم فرضية حول العالم الحقيقي إلى extent أن ما تم استخراجه ليس له أهمية.

    3.17

    Algorithmic Efficiency · ⁨كفاءة الخوارزمية⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-4): There exist problems that computers cannot solve, and even when a computer can solve a problem, it may not be able to do so in a reasonable amount of time.

    Learning Objective AAP-4.A: For determining the efficiency of an algorithm: a. Explain the difference between algorithms that run in reasonable time and those that do not. [Skill 1.D] b. Identify situations where a heuristic solution may be more appropriate. [Skill 1.D]

    • AAP-4.A.1 A problem is a general description of a task that can (or cannot) be solved algorithmically. An instance of a problem also includes specific input. For example, sorting is a problem; sorting the list (2,3,1,7) is an instance of the problem.
    • AAP-4.A.2 A decision problem is a problem with a yes/no answer (e.g., is there a path from A to B?). An optimization problem is a problem with the goal of finding the "best" solution among many (e.g., what is the shortest path from A to B?).
    • AAP-4.A.3 Efficiency is an estimation of the amount of computational resources used by an algorithm. Efficiency is typically expressed as a function of the size of the input.
      • Exclusion statement (EK AAP-4.A.3): Formal analysis of algorithms (Big-O) and formal reasoning using mathematical formulas are outside the scope of this course and the AP Exam.
    • AAP-4.A.4 An algorithm's efficiency is determined through formal or mathematical reasoning.
    • AAP-4.A.5 An algorithm's efficiency can be informally measured by determining the number of times a statement or group of statements executes.
    • AAP-4.A.6 Different correct algorithms for the same problem can have different efficiencies.
    • AAP-4.A.7 Algorithms with a polynomial efficiency or slower (constant, linear, square, cube, etc.) are said to run in a reasonable amount of time. Algorithms with exponential or factorial efficiencies are examples of algorithms that run in an unreasonable amount of time.
    • AAP-4.A.8 Some problems cannot be solved in a reasonable amount of time because there is no efficient algorithm for solving them. In these cases, approximate solutions are sought.
    • AAP-4.A.9 A heuristic is an approach to a problem that produces a solution that is not guaranteed to be optimal but may be used when techniques that are guaranteed to always find an optimal solution are impractical.
      • Exclusion statement (AAP-4.A.9): Specific heuristic solutions are outside the scope of this course and the AP Exam.
    العربية

    الفهم الدائم (AAP-4): توجد مشاكل لا يمكن للحاسوب حلها، وحتى عندما يتمكن الحاسوب من حل مشكلة ما، قد لا يستطيع القيام بذلك في وقت معقول.

    هدف التعلم AAP-4.A: لتحديد كفاءة خوارزمية: أ. اشرح الفرق بين الخوارزميات التي تعمل في وقت معقل وتلك التي لا تفعل ذلك. [مهارة 1.D] ب. حدد المواقف التي قد يكون فيها الحل الإلحامي أكثر ملاءمة. [مهارة 1.D]

    • AAP-4.A.1 المشكلة هي وصف عام لمهمة يمكن (أو لا يمكن) حلها خوارزميًا. الحالة الجزئية للمشكلة تشمل أيضًا المدخلات المحددة. على سبيل المثال، الترتيب هو مشكلة؛ ترتيب القائمة (2,3,1,7) هو حالة جزئية من المشكلة.
    • AAP-4.A.2 مشكلة القرار هي مشكلة ذات إجابة نعم/لا (مثل: هل يوجد مسار من A إلى B؟). مشكلة التحسين هي مشكلة تهدف إلى إيجاد "أفضل" حل بين العديد من الحلول (مثل: ما هو أقصر مسار من A إلى B؟).
    • AAP-4.A.3 الكفاءة هي تقدير لكمية الموارد الحسابية المستخدمة بواسطة خوارزمية ما. تُعبّر الكفاءة عادةً بدالة لحجم المدخلات.
      • عبارة الاستثناء (EK AAP-4.A.3): التحليل الرسمي للخوارزميات (Big-O) والاستدلال الرسمي باستخدام الصيغ الرياضية خارج نطاق هذا المقرر وامتحان AP.
    • AAP-4.A.4 تُحدد كفاءة الخوارزمية من خلال الاستدلال الرسمي أو الرياضي.
    • AAP-4.A.5 يمكن قياس كفاءة الخوارزمية بشكل غير رسمي عن طريق تحديد عدد مرات تنفيذ عبارة أو مجموعة من العبارات.
    • AAP-4.A.6 يمكن أن تختلف كفاءات الخوارزميات الصحيحة المختلفة لنفس المشكلة.
    • AAP-4.A.7 الخوارزميات ذات الكفاءة كثير الحدود أو البطيئة (ثابتة، خطية، تربيعية، مكعبة، إلخ) يُقال إنها تعمل في وقت معقول. الخوارزميات ذات الكفاءة الأسية أو المضاعفية أمثلة على خوارزميات تعمل في وقت غير معقول.
    • AAP-4.A.8 بعض المشاكل لا يمكن حلها في وقت معقل لأنه لا توجد خوارزمية فعالة لحلها. في هذه الحالات، يتم البحث عن حلول تقريبية.
    • AAP-4.A.9 الحل الإلحامي هو نهج لمشكلة ينتج حلاً ليس مضمونًا أن يكون الأمثل، ولكنه قد يُستخدم عندما تكون التقنيات المضمونة بإيجاد حل أمثل دائمًا غير عملية.
      • عبارة الاستثناء (AAP-4.A.9): الحلول الإلزامية المحددة خارج نطاق هذا المقرر وامتحان AP.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Efficiency 效率 is how much time (or memory) an algorithm needs as its input grows. A reasonable-time algorithm's work grows like a polynomial of the input size (e.g. linear or quadratic); an unreasonable-time algorithm grows far faster (e.g. doubling with each added item), becoming impractical for large inputs. A faster algorithm can make a previously impossible problem solvable. Sometimes an exact answer takes too long, so a heuristic 启发式 – an approach that finds a good-enough answer quickly – is used instead.

    العربية

    الكفاءة هي مقدار الوقت (أو الذاكرة) الذي يحتاجه خوارزمية ما كلما زاد حجم مدخلاتها. تعمل خوارزمية وقت معقول بزيادة تتناسب مع كثير حدود من حجم المدخلات (مثل الخطي أو التربيعي)، بينما تزداد خوارزمية وقت غير معقول بسرعة أكبر بكثير (مثل الضعف مع كل عنصر مضاف)، مما يجعلها غير عملية للمدخلات الكبيرة. يمكن أن تجعل الخوارزمية الأسرع مشكلة كانت مستحيلة الحل سابقاً قابلة للحل. أحياناً يأخذ الإجابة الدقيقة وقتاً طويلاً جداً، لذلك يتم استخدام خوارزمية استرشادية – وهي نهج يجد إجابة جيدة بما يكفي بسرعة – بدلاً منها.

    كيف يزداد زمن تشغيل الخوارزمية مع حجم المدخلات n
    كيف يزداد زمن تشغيل الخوارزمية مع حجم المدخلات n
    3.18

    Undecidable Problems · ⁨مسائل لا حسم لها⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (AAP-4): There exist problems that computers cannot solve, and even when a computer can solve a problem, it may not be able to do so in a reasonable amount of time.

    Learning Objective AAP-4.B: Explain the existence of undecidable problems in computer science. [Skill 1.A]

    • AAP-4.B.1 A decidable problem is a decision problem for which an algorithm can be written to produce a correct output for all inputs (e.g., "Is the number even?").
    • AAP-4.B.2 An undecidable problem is one for which no algorithm can be constructed that is always capable of providing a correct yes-or-no answer.
      • Exclusion statement (EK AAP-4.B.2): Determining whether a given problem is undecidable is outside the scope of this course and the AP Exam.
    • AAP-4.B.3 An undecidable problem may have some instances that have an algorithmic solution, but there is no algorithmic solution that could solve all instances of the problem.
    العربية

    الفهم الدائم (AAP-4): توجد مشاكل لا يمكن للحاسوب حلها، وحتى عندما يتمكن الحاسوب من حل مشكلة ما، قد لا يستطيع القيام بذلك في وقت معقول.

    هدف التعلم AAP-4.B: اشرح وجود المشاكل غير القابلة للقرار في علوم الحاسوب. [مهارة 1.A]

    • AAP-4.B.1 المشكلة القابلة للقرار هي مشكلة قرار يمكن كتابة خوارزمية لها لإنتاج مخرجات صحيحة لجميع المدخلات (مثل: "هل العدد زوجي؟").
    • AAP-4.B.2 المشكلة غير القابلة للقرار هي مشكلة لا يمكن بناء خوارزمية عليها تكون قادرة دائمًا على تقديم إجابة صحيحة بنعم أو لا.
      • عبارة الاستثناء (EK AAP-4.B.2): تحديد ما إذا كانت مشكلة معينة غير قابلة للقرار خارج نطاق هذا المقرر وامتحان AP.
    • AAP-4.B.3 قد تحتوي المشكلة غير القابلة للقرار على بعض الحالات الجزئية التي لها حل خوارزمي، ولكن لا يوجد حل خوارزمي يمكنه حل جميع الحالات الجزئية للمشكلة.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Some problems are undecidable 不可判定: no algorithm can solve every case of them with a correct yes/no answer. This is a fundamental limit of computing – not a matter of needing a faster computer, but a proof that no such algorithm can exist.

    Exam skill: be able to determine a code segment's result by tracing it, compare two algorithms' efficiency (reasonable vs unreasonable time), and recognize procedural and data abstraction in a program.

    العربية

    بعض المسائل لا يمكن حلها: لا توجد خوارزمية قادرة على حل كل حالة منها بإجابة صح نعم/لا. هذا حد أساسي في الحوسبة – وليس مسألة الحاجة لحاسوب أسرع، بل هو إثبات عدم وجود مثل هذه الخوارزمية أصلاً.

    مهارة الامتحان: القدرة على تحديد نتيجة جزء كود عن طريق تتبعه، ومقارنة كفاءتي خوارزميتين (وقت معقول مقابل غير معقول)، والتعرف على التجريد الإجرائي وبيانات البرمجة في البرنامج.

    3.18

    Exam tips · ⁨نصائح للامتحان⁩

    English
    • Know a variable is a named store for a value and trace how assignment updates it step by step.
    • Read the AP pseudocode carefully — a <- expression assigns, and lists are 1-indexed on the exam reference sheet.
    • Distinguish a variable from a list (a collection accessed by index) and use list operations correctly.
    • Evaluate expressions with the right precedence and boolean logic (AND, OR, NOT).
    • Pick clear, meaningful variable names — the written tasks reward readable code.
    العربية
    • معرفة أن المتغير هو مساحة تخزين مسماة بقيمة وأن تتبع كيف يقوم التعيين بتحديثه خطوة بخطوة.
    • اقرأ الكود الوهمي الخاص بـ AP بعناية – a <- expression يقوم بالتعيين، والقوائم مؤشرتها تبدأ من 1 في ورقة المرجع الامتحاني.
    • التمييز بين المتغير والقائمة (مجموعة يتم الوصول إليها بالمؤشر) واستخدام عمليات القائمة بشكل صحيح.
    • تقييم التعبيرات مع أولوية العمليات والمنطق البولياني الصحيح (AND، OR، NOT).
    • اختيار أسماء متغيرات واضحة ومعبرة — حيث تُكافأ المهام الكتابية الكود المقروء.
  • 4

    Computer Systems and Networks · ⁨أنظمة الحاسوب والشبكات⁩

    Watch lesson · ⁨شاهد الدرس⁩
    4.1

    The Internet

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (CSN-1): Computer systems and networks facilitate the transfer of data.

    Learning Objective CSN-1.A: Explain how computing devices work together in a network. [Skill 5.A]

    • CSN-1.A.1 A computing device is a physical artifact that can run a program. Some examples include computers, tablets, servers, routers, and smart sensors.
    • CSN-1.A.2 A computing system is a group of computing devices and programs working together for a common purpose.
    • CSN-1.A.3 A computer network is a group of interconnected computing devices capable of sending or receiving data.
    • CSN-1.A.4 A computer network is a type of computing system.
    • CSN-1.A.5 A path between two computing devices on a computer network (a sender and a receiver) is a sequence of directly connected computing devices that begins at the sender and ends at the receiver.
    • CSN-1.A.6 Routing is the process of finding a path from sender to receiver.
    • CSN-1.A.7 The bandwidth of a computer network is the maximum amount of data that can be sent in a fixed amount of time.
    • CSN-1.A.8 Bandwidth is usually measured in bits per second.

    Learning Objective CSN-1.B: Explain how the Internet works. [Skill 5.A]

    • CSN-1.B.1 The Internet is a computer network consisting of interconnected networks that use standardized, open (nonproprietary) communication protocols.
    • CSN-1.B.2 Access to the Internet depends on the ability to connect a computing device to an Internet-connected device.
    • CSN-1.B.3 A protocol is an agreed-upon set of rules that specify the behavior of a system.
    • CSN-1.B.4 The protocols used in the Internet are open, which allows users to easily connect additional computing devices to the Internet.
    • CSN-1.B.5 Routing on the Internet is usually dynamic; it is not specified in advance.
    • CSN-1.B.6 The scalability of a system is the capacity for the system to change in size and scale to meet new demands.
    • CSN-1.B.7 The Internet was designed to be scalable.

    Learning Objective CSN-1.C: Explain how data are sent through the Internet via packets. [Skill 5.A]

    • CSN-1.C.1 Information is passed through the Internet as a data stream. Data streams contain chunks of data, which are encapsulated in packets.
    • CSN-1.C.2 Packets contain a chunk of data and metadata used for routing the packet between the origin and the destination on the Internet, as well as for data reassembly.
    • CSN-1.C.3 Packets may arrive at the destination in order, out of order, or not at all.
    • CSN-1.C.4 IP, TCP, and UDP are common protocols used on the Internet.

    Learning Objective CSN-1.D: Describe the differences between the Internet and the World Wide Web. [Skill 5.A]

    • CSN-1.D.1 The World Wide Web is a system of linked pages, programs, and files.
    • CSN-1.D.2 HTTP is a protocol used by the World Wide Web.
    • CSN-1.D.3 The World Wide Web uses the Internet.
    العربية

    فهم دائم (CSN-1): تيسر أنظمة الحاسوب والشبكات نقل البيانات.

    الهدف التعليمي CSN-1.A: اشرح كيف تعمل أجهزة الحوسبة معاً في شبكة. [مهارة 5.A]

    • CSN-1.A.1 جهاز الحوسبة هو عنصر مادي يمكنه تشغيل برنامج. وتشمل بعض الأمثلة الحواسيب والأجهزة اللوحية والخوادم والراوترات والمستشعرات الذكية.
    • CSN-1.A.2 نظام الحوسبة هو مجموعة من أجهزة الحوسبة والبرامج تعمل معاً لغرض مشترك.
    • CSN-1.A.3 شبكة الحاسوب هي مجموعة من أجهزة الحوسبة المترابطة قادرة على إرسال أو استقبال البيانات.
    • CSN-1.A.4 شبكة الحاسوب هي نوع من أنظمة الحوسبة.
    • CSN-1.A.5 المسار بين جهازين للحوسبة على شبكة حاسوب (مرسل ومستقبل) هو تسلسل من أجهزة الحوسبة المترابطة مباشرة تبدأ من المرسل وتنتهي عند المستقبل.
    • CSN-1.A.6 التوجيه هو عملية إيجاد مسار من المرسل إلى المستقبل.
    • CSN-1.A.7 عرض النطاق الترددي للشبكة الحاسوبية هو الحد الأقصى لكمية البيانات التي يمكن إرسالها في مقدار زمني ثابت.
    • CSN-1.A.8 يُقاس عرض النطاق الترددي عادةً بوحدة بت في الثانية.

    هدف التعلم CSN-1.B: اشرح كيف تعمل الإنترنت. [مهارة 5.A]

    • CSN-1.B.1 الإنترنت هو شبكة حاسوبية تتكون من شبكات مترابطة تستخدم بروتوكولات اتصال موحدة ومفتوحة (غير ملكية).
    • CSN-1.B.2 يعتمد الوصول إلى الإنترنت على القدرة على توصيل جهاز حوسبة بجهاز متصل بالإنترنت.
    • CSN-1.B.3 البروتوكول هو مجموعة متفق عليها من القواعد تحدد سلوك النظام.
    • CSN-1.B.4 البروتوكولات المستخدمة في الإنترنت هي مفتوحة، مما يسمح للمستخدمين بسهولة ربط أجهزة حوسبة إضافية بالإنترنت.
    • CSN-1.B.5 التوجيه في الإنترنت ديناميكي عادة؛ ولا يتم تحديده مسبقاً.
    • CSN-1.B.6 قابلية التوسع للنظام هي قدرة النظام على تغيير حجمه ونطاقه لتلبية الاحتياجات الجديدة.
    • CSN-1.B.7 صُممت الإنترنت لتكون قابلة للتوسع.

    هدف التعلم CSN-1.C: اشرح كيف تُرسل البيانات عبر الإنترنت عن طريق الحزم. [مهارة 5.A]

    • CSN-1.C.1 تنتقل المعلومات عبر الإنترنت كـ تدفق بيانات. تحتوي تدفقات البيانات على كتل من البيانات، وهي محاطة بـ حزم.
    • CSN-1.C.2 تحتوي الحزم على كتلة من البيانات وبيانات وصفية تُستخدم لتوجيه الحزمة بين نقطة الأصل والوجهة على الإنترنت، وكذلك لإعادة تجميع البيانات.
    • CSN-1.C.3 قد تصل الحزم إلى الوجهة بترتيبها، أو خارج الترتيب، أو لا تصل إطلاقاً.
    • CSN-1.C.4 بروتوكولات IP وTCP وUDP هي بروتوكولات شائعة تُستخدم على الإنترنت.

    هدف التعلم CSN-1.D: صف الفروق بين الإنترنت والشبكة العنكبوت العالمية. [مهارة 5.A]

    • CSN-1.D.1 الشبكة العنكبوت العالمية هي نظام من الصفحات المترابطة والبرامج والملفات.
    • CSN-1.D.2 بروتوكول HTTP هو بروتوكول تُستخدمه الشبكة العنكبوت العالمية.
    • CSN-1.D.3 الشبكة العنكبوت العالمية تستخدم الإنترنت.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    An RJ45 Ethernet connector — physical links carry packets across the Internet
    An RJ45 Ethernet connector — physical links carry packets across the Internet

    The Internet 互联网 is a global network of networks. Data travels as packets 数据包 – small chunks that are sent separately and reassembled at the destination. Two ideas make it work at scale:

    The internet is the worldwide network; the web is one service running on it
    The internet is the worldwide network; the web is one service running on it
    • Protocols 协议 are agreed rules for communication. IP (Internet Protocol) addresses and routes packets; TCP reassembles them in order and re-requests lost ones; HTTP carries web pages; DNS translates a name like example.com into an IP address.
    • Redundancy 冗余 and routing: there are many possible paths between two points, so if one path fails, packets take another. This makes the Internet fault-tolerant 容错.

    The Internet is designed to be open and scalable – built on standards anyone can use, so it keeps working as billions of devices join. Bandwidth 带宽 is the amount of data a connection can carry per second.

    Explore · ⁨استكشف⁩

    How data crosses the Internet in packets · ⁨كيف تعبر البيانات الإنترنت في حزم⁩

    The Internet breaks a message into numbered packets, each addressed and routed independently (often by different paths), then reassembled at the destination. That design makes it fault-tolerant — if one route fails, packets take another. · ⁨يقسم الإنترنت الرسالة إلى حزم مرقمة، يتم توجيه كل منها بشكل مستقل (غالبًا عبر مسارات مختلفة)، ثم إعادة تجميعها عند الوجهة. هذا التصميم يجعله مقاومًا للأعطال — إذا فشل مسار واحد، تأخذ الحزم مسارًا آخر.⁩

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    Internet/ˈɪntənet/ الإنترنت (Internet)
    packets/ˈpækɪts/ حزم
    Protocols/ˈprəʊtəkɒlz/ البروتوكولات
    Redundancy/rɪˈdʌndənsi/ التكرار
    fault-tolerant/fɒlt ˈtɒlərənt/ تحمل الأعطال
    Bandwidth/ˈbændwɪdθ/ عرض النطاق الترددي
    Watch lesson · ⁨شاهد الدرس⁩
    4.2

    Fault Tolerance

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (CSN-1): Computer systems and networks facilitate the transfer of data.

    Learning Objective CSN-1.E: For fault-tolerant systems, like the Internet: a. Describe the benefits of fault tolerance. [Skill 1.D] b. Explain how a given system is fault-tolerant. [Skill 5.A] c. Identify vulnerabilities to failure in a system. [Skill 1.D]

    • CSN-1.E.1 The Internet has been engineered to be fault-tolerant, with abstractions for routing and transmitting data.
    • CSN-1.E.2 Redundancy is the inclusion of extra components that can be used to mitigate failure of a system if other components fail.
    • CSN-1.E.3 One way to accomplish network redundancy is by having more than one path between any two connected devices.
    • CSN-1.E.4 If a particular device or connection on the Internet fails, subsequent data will be sent via a different route, if possible.
    • CSN-1.E.5 When a system can support failures and still continue to function, it is called fault-tolerant. This is important because elements of complex systems fail at unexpected times, often in groups, and fault tolerance allows users to continue to use the network.
    • CSN-1.E.6 Redundancy within a system often requires additional resources but can provide the benefit of fault tolerance.
    • CSN-1.E.7 The redundancy of routing options between two points increases the reliability of the Internet and helps it scale to more devices and more people.
    العربية

    فهم دائم (CSN-1): تيسر أنظمة الحاسوب والشبكات نقل البيانات.

    هدف التعلم CSN-1.E: بالنسبة للأنظمة المتحملة للأخطاء، مثل الإنترنت: أ. صف فوائد تحمل الأخطاء. [مهارة 1.D] ب. اشرح كيف تكون الأنظمة المعطاة متحملة للأخطاء. [مهارة 5.A] ج. حدد نقاط الضعف المعرضة للفشل في النظام. [مهارة 1.D]

    • CSN-1.E.1 تم هندسة الإنترنت لتكون متحملة للأخطاء، مع وجود تجريدات للتوجيه ونقل البيانات.
    • CSN-1.E.2 التكرار هو تضمين مكونات إضافية يمكن استخدامها لتخفيف فشل النظام إذا فشلت مكونات أخرى.
    • CSN-1.E.3 إحدى الطرق لتحقيق تكرار الشبكة هي وجود أكثر من مسار بين أي جهازين متصلين.
    • CSN-1.E.4 إذا فشل جهاز معين أو اتصال على الإنترنت، سيتم إرسال البيانات اللاحقة عبر مسار مختلف، إن أمكن.
    • CSN-1.E.5 عندما يستطيع النظام دعم الفشل والاستمرار في العمل، يُسمى متحملاً للأخطاء. هذا مهم لأن عناصر الأنظمة المعقدة تفشل في أوقات غير متوقعة، وغالباً ما تفشل بشكل جماعي، ويتيح تحمل الأخطاء للمستخدمين الاستمرار في استخدام الشبكة.
    • CSN-1.E.6 يتطلب التكرار داخل النظام غالباً موارد إضافية ولكنه يمكن أن يوفر فائدة تحمل الأخطاء.
    • CSN-1.E.7 زيادة تكرار خيارات التوجيه بين نقطتين يعزز موثوقية الإنترنت ويساعده على التوسع ليشمل المزيد من الأجهزة والمزيد من الأشخاص.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    A Wi-Fi router: the local gateway that forwards packets toward the wider Internet
    A Wi-Fi router: the local gateway that forwards packets toward the wider Internet

    A system is fault-tolerant if it keeps working even when part of it fails. The Internet achieves this through redundant connections: because packets can be routed along multiple paths, the failure of one router or cable does not stop communication – traffic simply reroutes. Fault tolerance costs extra resources (the redundant paths) but greatly improves reliability 可靠性. A single path with no backup is not fault-tolerant.

    Packet switching sends packets by independent routes, so the network tolerates a failed link
    Packet switching sends packets by independent routes, so the network tolerates a failed link
    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    reliability/rɪˌlaɪəˈbɪlɪti/ الموثوقية
    4.3

    Parallel and Distributed Computing

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (CSN-2): Parallel and distributed computing leverage multiple computers to more quickly solve complex problems or process large data sets.

    Learning Objective CSN-2.A: For sequential, parallel, and distributed computing: a. Compare problem solutions. [Skill 1.D] b. Determine the efficiency of solutions. [Skill 1.D]

    • CSN-2.A.1 Sequential computing is a computational model in which operations are performed in order one at a time.
    • CSN-2.A.2 Parallel computing is a computational model where the program is broken into multiple smaller sequential computing operations, some of which are performed simultaneously.
    • CSN-2.A.3 Distributed computing is a computational model in which multiple devices are used to run a program.
    • CSN-2.A.4 Comparing efficiency of solutions can be done by comparing the time it takes them to perform the same task.
    • CSN-2.A.5 A sequential solution takes as long as the sum of all of its steps.
    • CSN-2.A.6 A parallel computing solution takes as long as its sequential tasks plus the longest of its parallel tasks.
    • CSN-2.A.7 The "speedup" of a parallel solution is measured in the time it took to complete the task sequentially divided by the time it took to complete the task when done in parallel.

    Learning Objective CSN-2.B: Describe benefits and challenges of parallel and distributed computing. [Skill 1.D]

    • CSN-2.B.1 Parallel computing consists of a parallel portion and a sequential portion.
    • CSN-2.B.2 Solutions that use parallel computing can scale more effectively than solutions that use sequential computing.
    • CSN-2.B.3 Distributed computing allows problems to be solved that could not be solved on a single computer because of either the processing time or storage needs involved.
    • CSN-2.B.4 Distributed computing allows much larger problems to be solved quicker than they could be solved using a single computer.
    • CSN-2.B.5 When increasing the use of parallel computing in a solution, the efficiency of the solution is still limited by the sequential portion. This means that at some point, adding parallel portions will no longer meaningfully increase efficiency.
    العربية

    الفهم الدائم (CSN-2): تستغل الحوسبة المتوازية والموزعة عدة حواسيب لحل المشكلات المعقدة أو معالجة مجموعات البيانات الكبيرة بشكل أسرع.

    هدف التعلم CSN-2.A: للحوسبة المتسلسلة والمتوازية والموزعة: أ. قارن حلول المشكلات. [مهارة 1.D] ب. حدد كفاءة الحلول. [مهارة 1.D]

    • CSN-2.A.1 الحوسبة المتسلسلة هي نموذج حاسوبي يتم فيه تنفيذ العمليات ترتيبياً واحدة تلو الأخرى.
    • CSN-2.A.2 الحوسبة المتوازية هي نموذج حاسوبي يتم فيه تقسيم البرنامج إلى عمليات حوسبة متسلسلة أصغر متعددة، يتم تنفيذ بعضها بالتزامن.
    • CSN-2.A.3 الحوسبة الموزعة هي نموذج حاسوبي يتم فيه استخدام أجهزة متعددة لتشغيل برنامج.
    • CSN-2.A.4 يمكن إجراء مقارنة كفاءة الحلول عن طريق مقارنة الوقت المستغرق لإنجاز نفس المهمة.
    • CSN-2.A.5 يستغرق الحل المتسلسل وقتاً يساوي مجموع جميع خطواته.
    • CSN-2.A.6 يستغرق حل الحوسبة المتوازية وقتاً يساوي المهام المتسلسلة له بالإضافة إلى أطول المهام المتوازية لديه.
    • CSN-2.A.7 يُقاس "التسريع" للحل المتوازي بالوقت الذي استغرقه إكمال المهمة بشكل متسلسل مقسوماً على الوقت الذي استغرقه إكمال المهمة عند إجرائها بشكل متوازٍ.

    هدف التعلم CSN-2.B: صف فوائد وتحديات الحوسبة المتوازية والموزعة. [مهارة 1.D]

    • CSN-2.B.1 تتكون الحوسبة المتوازية من جزء متوازي وجزء متسلسل.
    • CSN-2.B.2 الحلول التي تستخدم الحوسبة المتوازية يمكن أن تتوسع بكفاءة أكبر من الحلول التي تستخدم الحوسبة المتسلسلة.
    • CSN-2.B.3 تسمح الحوسبة الموزعة بحل مشكلات لم يكن يمكن حلها على حاسوب واحد بسببeither وقت المعالجة أو احتياجات التخزين.
    • CSN-2.B.4 يتيح الحوسبة الموزعة حل مسائل أكبر بكثير وبسرعة أكبر مما يمكن حله باستخدام حاسوب واحد.
    • CSN-2.B.5 عند زيادة استخدام الحوسبة المتوازية في الحل، تظل كفاءة الحل محدودة بالجزء التسلسلي. هذا يعني أنه في مرحلة ما، لن يؤدي إضافة أجزاء متوازية إلى زيادة الكفاءة بشكل جوهري.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    Data-centre server racks: distributed computing spreads work across many machines
    Data-centre server racks: distributed computing spreads work across many machines
    • Sequential computing 顺序计算 runs one operation at a time.
    • Parallel computing 并行计算 splits a task into parts that run at the same time on multiple processors, finishing faster.
    • Distributed computing 分布式计算 uses many computers connected by a network to work on one problem – essential for problems too big for a single machine.
    Parallel computing: many processors work at the same time
    Parallel computing: many processors work at the same time

    A parallel solution's speedup 加速比 is the sequential time divided by the parallel time. Speedup is limited: parts that must run in sequence cannot be sped up by adding processors, so doubling the processors rarely doubles the speed.

    Worked example. A task has a part that must run sequentially, taking $40$ seconds, plus a parallelizable part that takes $60$ seconds on one processor – so on a single processor the whole task takes $40+60=100$ seconds. Spread the parallel part across $3$ processors and it takes $\tfrac{60}{3}=20$ seconds, so the total parallel time is $40+20=60$ seconds and the speedup is $\tfrac{100}{60}\approx1.67$. The $40$-second sequential part is a floor: even with infinitely many processors the task can never finish in under $40$ seconds.

    Exam skill: given the times for the sequential and parallel portions of a task, be able to calculate the total parallel time and the speedup.

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    Sequential computing/siːˈkwenʃl kəmˈpjuːtɪŋ/ الحوسبة المتسلسلة
    Parallel computing/ˈpærəlel kəmˈpjuːtɪŋ/ الحوسبة المتوازية
    Distributed computing/ˈdɪstrɪbjuːtɪd kəmˈpjuːtɪŋ/ الحوسبة الموزعة
    speedup/ˈspiːdʌp/ زيادة السرعة
    4.3

    Exam tips

    • Describe how data travels in packets over a redundant, fault-tolerant network of independent routers.
    • Know that protocols (IP, TCP, HTTP) are agreed rules, and that open standards let different systems interoperate.
    • Explain scalability and how the Internet grows without central control.
    • Contrast bandwidth (rate) with latency (delay), and describe the DNS name-to-address lookup.
    • Discuss the digital divide and security basics (encryption, authentication) in plain terms.
  • 5

    Impact of Computing · ⁨تأثير الحوسبة⁩

    Watch lesson · ⁨شاهد الدرس⁩
    5.1

    Beneficial and Harmful Effects · ⁨الآثار المفيدة والضارة⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (IOC-1): While computing innovations are typically designed to achieve a specific purpose, they may have unintended consequences.

    Learning Objective IOC-1.A: Explain how an effect of a computing innovation can be both beneficial and harmful. [Skill 5.C]

    • IOC-1.A.1 People create computing innovations.
    • IOC-1.A.2 The way people complete tasks often changes to incorporate new computing innovations.
    • IOC-1.A.3 Not every effect of a computing innovation is anticipated in advance.
    • IOC-1.A.4 A single effect can be viewed as both beneficial and harmful by different people, or even by the same person.
    • IOC-1.A.5 Advances in computing have generated and increased creativity in other fields, such as medicine, engineering, communications, and the arts.

    Learning Objective IOC-1.B: Explain how a computing innovation can have an impact beyond its intended purpose. [Skill 5.C]

    • IOC-1.B.1 Computing innovations can be used in ways that their creators had not originally intended:
      • The World Wide Web was originally intended only for rapid and easy exchange of information within the scientific community.
      • Targeted advertising is used to help businesses, but it can be misused at both individual and aggregate levels.
      • Machine learning and data mining have enabled innovation in medicine, business, and science, but information discovered in this way has also been used to discriminate against groups of individuals.
    • IOC-1.B.2 Some of the ways computing innovations can be used may have a harmful impact on society, the economy, or culture.
    • IOC-1.B.3 Responsible programmers try to consider the unintended ways their computing innovations can be used and the potential beneficial and harmful effects of these new uses.
    • IOC-1.B.4 It is not possible for a programmer to consider all the ways a computing innovation can be used.
    • IOC-1.B.5 Computing innovations have often had unintended beneficial effects by leading to advances in other fields.
    • IOC-1.B.6 Rapid sharing of a program or running a program with a large number of users can result in significant impacts beyond the intended purpose or control of the programmer.
    العربية

    الفهم الدائم (IOC-1): بينما تُصمم الابتكارات الحاسوبية عادةً لتحقيق غرض محدد، إلا أنها قد يكون لها عواقب غير مقصودة.

    هدف التعلم IOC-1.A: اشرح كيف يمكن أن يكون تأثير الابتكار الحاسوبي مفيدًا وضارًا في آن واحد. [مهارة 5.C]

    • IOC-1.A.1 يقوم البشر بإنشاء ابتكارات حاسوبية.
    • IOC-1.A.2 تتغير طرق إنجاز البشر للمهام غالبًا لتتضمن الابتكارات الحاسوبية الجديدة.
    • IOC-1.A.3 لا يتم التنبؤ بكل تأثيرات الابتكار الحاسوبي مسبقًا.
    • IOC-1.A.4 يمكن اعتبار تأثير واحد مفيدًا وضارًا في آن واحد من قبل أشخاص مختلفين، أو حتى من قبل نفس الشخص.
    • IOC-1.A.5 أدت التطورات في مجال الحوسبة إلى توليد وزيادة الإبداع في مجالات أخرى، مثل الطب والهندسة والاتصالات والفنون.

    هدف التعلم IOC-1.B: اشرح كيف يمكن للابتكار الحاسوبي أن يكون له تأثير يتجاوز الغرض المقصود منه. [مهارة 5.C]

    • IOC-1.B.1 يمكن استخدام الابتكارات الحاسوبية بطرق لم يكن المبدعون قد نواها في الأصل:
      • كان الويب العالمي مصممًا في البداية فقط للتبادل السريع والسهل للمعلومات داخل المجتمع العلمي.
      • يُستخدم الإعلان المستهدف لمساعدة الشركات، ولكن يمكن إساءة استخدامه على كل من المستوى الفردي والمجتمعي.
      • مكنت تعلم الآلة وتنقيب البيانات من الابتكار في الطب والأعمال التجارية والعلم، ولكن تم أيضًا استخدام المعلومات المكتشفة بهذه الطريقة للتمييز ضد مجموعات من الأفراد.
    • IOC-1.B.2 بعض الطرق التي يمكن بها استخدام الابتكارات الحاسوبية قد يكون لها تأثير ضار على المجتمع أو الاقتصاد أو الثقافة.
    • IOC-1.B.3 يحاول المبرمجون المسؤولون مراعاة الطرق غير المقصودة التي يمكن بها استخدام ابتكاراتهم الحاسوبية والآثار المفيدة والضارة المحتملة لهذه الاستخدامات الجديدة.
    • IOC-1.B.4 لا يمكن للمبرمج النظر في جميع الطرق التي يمكن بها استخدام الابتكار الحاسوبي.
    • IOC-1.B.5 كان للابتكارات الحاسوبية غالبًا آثار مفيدة غير مقصودة من خلال المساهمة في تطورات في مجالات أخرى.
    • IOC-1.B.6 يمكن أن يؤدي المشاركة السريعة لبرنامج أو تشغيله مع عدد كبير من المستخدمين إلى تأثيرات كبيرة تتجاوز الغرض المقصود منه أو سيطرة المبرمج.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Every computing innovation can be used in ways that help and ways that harm – often the same technology does both. A social network connects people and can spread misinformation; automation raises productivity and can remove jobs. Effects are frequently unintended: creators cannot foresee every use. When you evaluate a computing innovation, weigh its benefits and harms on people and society, and remember that harms are not always deliberate.

    Computing also generates creativity in other fields, which the CED asks for as a benefit in its own right, not merely as convenience: modelling and imaging in medicine, simulation in engineering, new forms in the arts and music, and new kinds of communication entirely. An innovation's beneficial effects are often in a field far from computing.

    العربية
    مجموعة من النفايات الإلكترونية — الحوسبة لها تكاليف بيئية بالإضافة إلى فوائدها
    مجموعة من النفايات الإلكترونية — الحوسبة لها تكاليف بيئية بالإضافة إلى فوائدها

    يمكن استخدام كل ابتكار في الحوسبة بطرق تُساعد وأخرى تُضرّ – وغالباً ما تقوم نفس التقنية بكلتا الوظيفتين. شبكات التواصل الاجتماعي تربط الناس وتُمكّن أيضاً من نشر المعلومات المضللة؛ والأتمتة ترفع الإنتاجية وتسبب أيضاً فقدان الوظائف. غالباً ما تكون هذه الآثار غير مقصودة: لا يمكن للمبتكرين التنبؤ بكل الاستخدامات المحتملة. عند تقييم أي ابتكار في الحوسبة، قارن بين فوائده وأضراره على الأفراد والمجتمع، وتذكر أن الأضرار ليست بالضرورة متعمدة.

    الحوسبة تؤثر على الرفاهية العامة بعدة طرق
    الحوسبة تؤثر على الرفاهية العامة بعدة طرق

    تُنتج الحوسبة أيضاً الإبداع في مجالات أخرى، وهو ما تطالب به لجنة الامتحانات كفائدة مستقلة وليست مجرد وسيلة للراحة: النمذجة والتصوير في الطب، والمحاكاة في الهندسة، وأشكال جديدة في الفنون والموسيقى، وأنواع جديدة تماماً من الاتصالات. غالباً ما تكون تأثيرات الابتكار المفيدة في مجال بعيد عن الحوسبة نفسها.

    5.2

    The Digital Divide · ⁨الفجوة الرقمية⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (IOC-1): While computing innovations are typically designed to achieve a specific purpose, they may have unintended consequences.

    Learning Objective IOC-1.C: Describe issues that contribute to the digital divide. [Skill 5.C]

    • IOC-1.C.1 Internet access varies between socioeconomic, geographic, and demographic characteristics, as well as between countries.
    • IOC-1.C.2 The "digital divide" refers to differing access to computing devices and the Internet, based on socioeconomic, geographic, or demographic characteristics.
    • IOC-1.C.3 The digital divide can affect both groups and individuals.
    • IOC-1.C.4 The digital divide raises issues of equity, access, and influence, both globally and locally.
    • IOC-1.C.5 The digital divide is affected by the actions of individuals, organizations, and governments.
    العربية

    الفهم الدائم (IOC-1): بينما تُصمم الابتكارات الحاسوبية عادةً لتحقيق غرض محدد، إلا أنها قد يكون لها عواقب غير مقصودة.

    هدف التعلم IOC-1.C: صف القضايا التي تساهم في وجود الفجوة الرقمية. [مهارة 5.C]

    • IOC-1.C.1 يختلف الوصول إلى الإنترنت بين الخصائص الاجتماعية والاقتصادية والجغرافية والديموغرافية، وكذلك بين الدول.
    • IOC-1.C.2 يشير "الفجوة الرقمية" إلى الاختلافات في الوصول إلى الأجهزة الحاسوبية والإنترنت، بناءً على الخصائص الاجتماعية والاقتصادية أو الجغرافية أو الديموغرافية.
    • IOC-1.C.3 يمكن أن تؤثر الفجوة الرقمية على كل من المجموعات والأفراد.
    • IOC-1.C.4 تثير الفجوة الرقمية قضايا العدالة والوصول والتأثير، على الصعيدين العالمي والمحلي.
    • IOC-1.C.5 تتأثر الفجوة الرقمية بأفعال الأفراد والمنظمات والحكومات.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    The digital divide 数字鸿沟 is the unequal access to computing and the Internet across groups – by income, geography, age, or country. Those with access gain education, jobs, and services; those without fall further behind. The divide is shaped by economic, social, and geographic factors, and efforts to close it (affordable devices, public access, infrastructure) aim to make computing's benefits fairer.

    العربية

    الفجوة الرقمية هي عدم المساواة في الوصول إلى الحوسبة والإنترنت عبر المجموعات – بناءً على الدخل، الموقع الجغرافي، العمر، أو الدولة. أولئك الذين يملكون الوصول يحصلون على تعليم ووظائف وخدمات؛ بينما يتخلف آخرون أكثر فأكثر. تتشكل الفجوة بسبب عوامل اقتصادية واجتماعية وجغرافية، وتسعى الجهود لسد هذا الفارق (الأجهزة المعقولة، الوصول العام، البنية التحتية) لجعل فوائد الحوسبة أكثر عدلاً.

    أجهزة حاسوب مكتبة عامة: الفجوة الرقمية تتعلق بعدم المساواة في الوصول للأجهزة والاتصال والمهارات
    أجهزة حاسوب مكتبة عامة: الفجوة الرقمية تتعلق بعدم المساواة في الوصول للأجهزة والاتصال والمهارات
    هوائي فضائي ريفي: الجغرافيا لا تزال تحدد من يحصل على إنترنت سريع ومن ينتظر
    هوائي فضائي ريفي: الجغرافيا لا تزال تحدد من يحصل على إنترنت سريع ومن ينتظر
    5.3

    Computing Bias · ⁨تحيز الحوسبة⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (IOC-1): While computing innovations are typically designed to achieve a specific purpose, they may have unintended consequences.

    Learning Objective IOC-1.D: Explain how bias exists in computing innovations. [Skill 5.E]

    • IOC-1.D.1 Computing innovations can reflect existing human biases because of biases written into the algorithms or biases in the data used by the innovation.
    • IOC-1.D.2 Programmers should take action to reduce bias in algorithms used for computing innovations as a way of combating existing human biases.
    • IOC-1.D.3 Biases can be embedded at all levels of software development.
    العربية

    الفهم الدائم (IOC-1): بينما تُصمم الابتكارات الحاسوبية عادةً لتحقيق غرض محدد، إلا أنها قد يكون لها عواقب غير مقصودة.

    هدف التعلم IOC-1.D: اشرح كيفية وجود التحيز في الابتكارات الحاسوبية. [مهارة 5.E]

    • IOC-1.D.1 يمكن أن تعكس الابتكارات الحاسوبية التحيزات البشرية الموجودة بسبب التحيزات المكتوبة في الخوارزميات أو التحيزات في البيانات المستخدمة من قبل الابتكار.
    • IOC-1.D.2 يجب على المبرمجين اتخاذ إجراءات لتقليل التحيز في الخوارزميات المستخدمة في الابتكارات الحاسوبية كطريقة لمكافحة التحيزات البشرية الموجودة.
    • IOC-1.D.3 يمكن أن تكون التحيزات مدمجة في جميع مستويات تطوير البرمجيات.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Bias 偏见 can be built into computing systems – often unintentionally. If the data used to build a system reflects existing prejudice, or if the designers' assumptions are one-sided, the system can produce unfair results (for example, a hiring tool that favors one group). Bias can enter at every stage – data collection, design, and use – so systems should be tested for fairness across different groups. Recognizing that "the computer said so" is not the same as "fair" is an important habit.

    العربية
    سيارة ذاتية القيادة في شارع مديني – الأنظمة المستقلة تثير أسئلة السلامة والتحيز
    سيارة ذاتية القيادة في شارع مديني – الأنظمة المستقلة تثير أسئلة السلامة والتحيز

    التحيز قد يكون مُدمجاً في أنظمة الحوسبة – وغالباً بشكل غير مقصود. إذا كانت البيانات المستخدمة لبناء النظام تعكس تحيزات قائمة، أو إذا كانت افتراضات المصممين أحادية الجانب، فقد يُنتج النظام نتائج غير عادلة (على سبيل المثال، أداة للتوظيف تفضل مجموعة دون أخرى). يمكن أن يدخل التحيز في كل مرحلة – جمع البيانات، التصميم، والاستخدام – لذا يجب اختبار الأنظمة لضمان العدالة عبر مجموعات مختلفة. يُعد إدراك أن "الحاسوب قال ذلك" لا يعني بالضرورة أنه "عادِل" عادةً مهمة مهمة.

    5.4

    Crowdsourcing · ⁨العمل الجماعي (Crowdsourcing)⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (IOC-1): While computing innovations are typically designed to achieve a specific purpose, they may have unintended consequences.

    Learning Objective IOC-1.E: Explain how people participate in problem-solving processes at scale. [Skill 1.C]

    • IOC-1.E.1 Widespread access to information and public data facilitates the identification of problems, development of solutions, and dissemination of results.
    • IOC-1.E.2 Science has been affected by using distributed and "citizen science" to solve scientific problems.
    • IOC-1.E.3 Citizen science is scientific research conducted in whole or part by distributed individuals, many of whom may not be scientists, who contribute relevant data to research using their own computing devices.
    • IOC-1.E.4 Crowdsourcing is the practice of obtaining input or information from a large number of people via the Internet.
    • IOC-1.E.5 Human capabilities can be enhanced by collaboration via computing.
    • IOC-1.E.6 Crowdsourcing offers new models for collaboration, such as connecting businesses or social causes with funding.
    العربية

    الفهم الدائم (IOC-1): بينما تُصمم الابتكارات الحاسوبية عادةً لتحقيق غرض محدد، إلا أنها قد يكون لها عواقب غير مقصودة.

    هدف التعلم IOC-1.E: اشرح كيف يشارك الناس في عمليات حل المشكلات على نطاق واسع. [مهارة 1.C]

    • IOC-1.E.1 يسهل الوصول الواسع النطاق إلى المعلومات والبيانات العامة تحديد المشاكل وتطوير الحلول ونشر النتائج.
    • IOC-1.E.2 تأثرت العلوم باستخدام النظام اللامركزي و"العلم المواطن" لحل المشكلات العلمية.
    • IOC-1.E.3 العلم المواطن هو بحث علمي يُجرى كليًا أو جزئيًا من قبل أفراد موزعين، العديد منهم قد لا يكونون علماء، يساهمون ببيانات ذات صلة في البحث باستخدام أجهزتهم الحاسوبية الخاصة.
    • IOC-1.E.4 العمل الجماعي عبر الإنترنت هو ممارسة الحصول على مدخلات أو معلومات من عدد كبير من الأشخاص عبر الإنترنت.
    • IOC-1.E.5 يمكن تعزيز القدرات البشرية من خلال التعاون عبر الحوسبة.
    • IOC-1.E.6 يوفر العمل الجماعي عبر الإنترنت نماذج جديدة للتعاون، مثل ربط الشركات أو القضايا الاجتماعية بالتمويل.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Crowdsourcing 众包 obtains input, ideas, or funding from a large group of people, usually online. It harnesses the knowledge and effort of many – mapping projects, product reviews, citizen science, and crowdfunding all rely on it. The Internet makes crowdsourcing possible at a scale and speed never before achievable, letting a project draw on contributors worldwide.

    العربية

    العمل الجماعي يستمد المدخلات والأفكار أو التمويل من مجموعة كبيرة من الأشخاص، عادةً عبر الإنترنت. إنه يستغل المعرفة والجهد العديد من الأشخاص – مشاريع الخرائط، ومراجعات المنتجات، والعلم المواطن، وجمع التبرعات الجماعي جميعها تعتمد عليه. يجعل الإنترنت العمل الجماعي ممكناً على نطاق وسرعة لم يكن ممكناً سابقاً، مما يسمح للمشروع بالاستفادة من مساهم من جميع أنحاء العالم.

    جلسة تعديل ويكيبيديا: العمل الجماعي يجمع جهود الكثيرين في مورد مشترك
    جلسة تعديل ويكيبيديا: العمل الجماعي يجمع جهود الكثيرين في مورد مشترك
    5.5

    Legal and Ethical Concerns · ⁨المخاوف القانونية والأخلاقية⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (IOC-1): While computing innovations are typically designed to achieve a specific purpose, they may have unintended consequences.

    Learning Objective IOC-1.F: Explain how the use of computing can raise legal and ethical concerns. [Skill 5.E]

    • IOC-1.F.1 Material created on a computer is the intellectual property of the creator or an organization.
    • IOC-1.F.2 Ease of access and distribution of digitized information raises intellectual property concerns regarding ownership, value, and use.
    • IOC-1.F.3 Measures should be taken to safeguard intellectual property.
    • IOC-1.F.4 The use of material created by someone else without permission and presented as one's own is plagiarism and may have legal consequences.
    • IOC-1.F.5 Some examples of legal ways to use materials created by someone else include:
      • Creative Commons—a public copyright license that enables the free distribution of an otherwise copyrighted work. This is used when the content creator wants to give others the right to share, use, and build upon the work they have created.
      • open source—programs that are made freely available and may be redistributed and modified
      • open access—online research output free of any and all restrictions on access and free of many restrictions on use, such as copyright or license restrictions
    • IOC-1.F.6 The use of material created by someone other than you should always be cited.
    • IOC-1.F.7 Creative Commons, open source, and open access have enabled broad access to digital information.
    • IOC-1.F.8 As with any technology or medium, using computing to harm individuals or groups of people raises legal and ethical concerns.
    • IOC-1.F.9 Computing can play a role in social and political issues, which in turn often raises legal and ethical concerns.
    • IOC-1.F.10 The digital divide raises ethical concerns around computing.
    • IOC-1.F.11 Computing innovations can raise legal and ethical concerns. Some examples of these include:
      • the development of software that allows access to digital media downloads and streaming
      • the development of algorithms that include bias
      • the existence of computing devices that collect and analyze data by continuously monitoring activities
    العربية

    الفهم الدائم (IOC-1): بينما تُصمم الابتكارات الحاسوبية عادةً لتحقيق غرض محدد، إلا أنها قد يكون لها عواقب غير مقصودة.

    هدف التعلم IOC-1.F: اشرح كيف يمكن أن يثير استخدام الحوسبة مخاوف قانونية وأخلاقية. [مهارة 5.E]

    • IOC-1.F.1 المواد المنشأة على الكمبيوتر هي ملكية فكرية للمبتكر أو المؤسسة.
    • IOC-1.F.2 سهولة الوصول وتوزيع المعلومات الرقمية تثير مخاوف الملكية الفكرية فيما يتعلق بالملكية والقيمة والاستخدام.
    • IOC-1.F.3 ينبغي اتخاذ تدابير لحماية الملكية الفكرية.
    • IOC-1.F.4 استخدام مواد أنشأها شخص آخر دون إذن وتقديمها على أنها خاصة بك يُعد سرقة أدبية وقد يكون له عواقب قانونية.
    • IOC-1.F.5 بعض الأمثلة على الطرق القانونية لاستخدام مواد أنشأها شخص آخر تشمل:
      • Creative Commons—رخصة حقوق طبع ونشر عامة تتيح التوزيع المجاني لعمل محمي بحقوق الطبع والنشر بشكل افتراضي. يُستخدم هذا عندما يرغب منشئ المحتوى في منح الآخرين الحق في المشاركة والاستخدام وبناء العمل الذي أنشأوه.
      • مفتوح المصدر—برامج تُقدم مجاناً ويمكن إعادة توزيعها وتعديلها
      • الوصول المفتوح—مخرجات بحثية عبر الإنترنت مجانية من أي وجميع قيود الوصول ومفتوحة على نطاق واسع للاستخدام، مثل قيود حقوق الطبع والنشر أو التراخيص
    • IOC-1.F.6 يجب دائمًا الإشارة إلى المواد التي تم إنشاؤها من قبل شخص آخر غيرك.
    • IOC-1.F.7 مكّنت كل من Creative Commons ومفتوح المصدر والوصول المفتوح من الوصول الواسع إلى المعلومات الرقمية.
    • IOC-1.F.8 كما هو الحال مع أي تقنية أو وسيط، فإن استخدام الحوسبة لإيذاء الأفراد أو المجموعات يثير مخاوف قانونية وأخلاقية.
    • IOC-1.F.9 يمكن للحوسبة أن تلعب دورًا في القضايا الاجتماعية والسياسية، مما يثير بدوره مخاوف قانونية وأخلاقية.
    • IOC-1.F.10 تثير الفجوة الرقمية مخاوف أخلاقية حول الحوسبة.
    • IOC-1.F.11 يمكن أن تثير ابتكارات الحوسبة مخاوف قانونية وأخلاقية. بعض أمثلة ذلك تشمل:
      • تطوير برمجيات تسمح بالوصول إلى تنزيلات الوسائط الرقمية والتدفق
      • تطوير خوارزميات تتضمن تحيزًا
      • وجود أجهزة حوسبة تجمع وتحلل البيانات من خلال المراقبة المستمرة للأنشطة

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Computing raises questions of law and ethics:

    • Intellectual property 知识产权 and copyright 版权 protect creators' work; using it may require permission or a license. Open-source 开源 and Creative Commons licenses let creators share work under stated terms.
    • Plagiarism 抄袭 – using others' work as your own – is unethical and often illegal.
    • Collecting and using personal data raises privacy questions about consent and misuse.

    The three "open" terms, which are not the same thing

    Term What it means
    open source programs that are made freely available and may be redistributed and modified by anyone. The licence grants those rights explicitly — free of charge is not the same as open source, and a free program you may not modify is not open source.
    open access 开放获取 research and other content made available online without charge, so a reader does not need a subscription. It says nothing about the right to modify.
    Creative Commons 知识共享 a family of licences a creator applies to their own work to grant specific permissions in advance — for example "you may reuse this if you credit me" or "you may reuse this but not commercially".

    All three are ways of granting rights the creator holds by default under copyright. That is why they matter for the exam: copyright is automatic, so anything not explicitly licensed is restricted, and using it needs permission.

    Just because something is technically possible does not make it legal or ethical.

    What is recorded while you browse

    Two collection routes the CED names, and neither needs you to type anything:

    • Websites can record and maintain a history of the individuals who have viewed their pages — which pages, when, how long, and from which device.
    • Search engines can use your search history to suggest websites, and to sell targeted marketing: the advertisement follows the search, which is why a product looked up once then appears for weeks.

    Neither is inherently malicious, and both are the mechanism behind services people find useful. The point the exam wants is that data collected for one purpose can be combined and used for another, often without the person realising they agreed to it.

    العربية
    غرفة تحكم بمراقبة CCTV: أنظمة المراقبة تبادل مكاسب السلامة مع مخاوف الخصوصية
    غرفة تحكم بمراقبة CCTV: أنظمة المراقبة تبادل مكاسب السلامة مع مخاوف الخصوصية

    تثير الحوسبة تساؤلات قانونية وأخلاقية:

    • الملكية الفكرية وحقوق النشر تحمي عمل المبدعين؛ واستخدامه قد يتطلب إذنًا أو ترخيصًا. تسمح تراخيص الكود المفتوح وكرييتيف كومنز للمبدعين بمشاركة أعمالهم بشروط محددة.
    • السرقة الأدبية – استخدام عمل الآخرين باعتباره خاصًا بك – أمر غير أخلاقي وغالبًا ما يكون غير قانوني.
    • جمع البيانات الشخصية واستخدامها يثير مسائل خصوصية تتعلق بالإذن والإساءة للاستخدام.

    المصطلحات الثلاثة "مفتوحة"، والتي ليست متماثلة

    المصطلح ماذا يعني
    الكود المفتوح برامج يتم توفيرها مجانًا ويمكن لأي شخص إعادة توزيعها وتعديلها. يمنح التراخيص تلك الحقوق صراحة – المجانية ليست هي نفسها الكود المفتوح، والبرنامج المجاني الذي لا يمكنك تعديله ليس كودًا مفتوحًا.
    الوصول المفتوح أبحاث ومحتوى آخر متوفر عبر الإنترنت بدون رسوم، بحيث لا يحتاج القارئ إلى اشتراك. لا يقول شيئًا عن حق التعديل.
    كرييتيف كومنز عائلة من الترابيقات يطبقها المبدع على أعماله لإ granting إجازات محددة مسبقًا – على سبيل المثال "يمكنك إعادة استخدام هذا إذا نسبت لي" أو "يمكنك إعادة استخدام هذا ولكن ليس لأغراض تجارية".

    جميعها ثلاث طرق لـ منح حقوق يملكها المبدع بشكل افتراضي بموجب حقوق النشر. ولهذا السبب هي مهمة للامتحان: حقوق النشر تلقائية، لذا فإن أي شيء غير مرخص صراحة هو مقيد، واستخدامه يتطلب إذنًا.

    فقط لأن شيئًا ما ممكن تقنيًا لا يجعله قانونيًا أو أخلاقيًا.

    ما يتم تسجيله أثناء تصفحك

    طريقتان لجمع البيانات يذكرهما برنامج الامتحان، ولا تحتاج أي منهما إلى كتابة أي شيء:

    • يمكن للمواقع تسجيل والحفاظ على سجل للأفراد الذين زاروا صفحاتها – أي الصفحات، ومتى، ولأي مدة، ومن أي جهاز.
    • يمكن لمحركات البحث استخدام سجل بحثك لاقتراح مواقع ويب، ولتسويق مستهدف: حيث يتبع الإعلان عملية البحث، ولهذا السبب يظهر منتج تم البحث عنه مرة واحدة لفترة طويلة.

    لا يعد أي منهما ضارًا بطبيعته، وكلاهما يمثل الآلية الكامنة خلف الخدمات التي يراها الناس مفيدة. النقطة التي يركز عليها الامتحان هي أن البيانات المجمعة لغرض واحد يمكن دمجها واستخدامها لغرض آخر، وغالبًا دون أن يدرك الشخص أنه وافق على ذلك.

    5.6

    Safe Computing · ⁨الحوسبة الآمنة⁩

    Syllabus · ⁨المنهج⁩
    English

    Enduring Understanding (IOC-2): The use of computing innovations may involve risks to personal safety and identity.

    Learning Objective IOC-2.A: Describe the risks to privacy from collecting and storing personal data on a computer system. [Skill 5.D]

    • IOC-2.A.1 Personally identifiable information (PII) is information about an individual that identifies, links, relates, or describes them. Examples of PII include:
      • Social Security number
      • age
      • race
      • phone number(s)
      • medical information
      • financial information
      • biometric data
    • IOC-2.A.2 Search engines can record and maintain a history of searches made by users.
    • IOC-2.A.3 Websites can record and maintain a history of individuals who have viewed their pages.
    • IOC-2.A.4 Devices, websites, and networks can collect information about a user's location.
    • IOC-2.A.5 Technology enables the collection, use, and exploitation of information about, by, and for individuals, groups, and institutions.
    • IOC-2.A.6 Search engines can use search history to suggest websites or for targeted marketing.
    • IOC-2.A.7 Disparate personal data, such as geolocation, cookies, and browsing history, can be aggregated to create knowledge about an individual.
    • IOC-2.A.8 PII and other information placed online can be used to enhance a user's online experiences.
    • IOC-2.A.9 PII stored online can be used to simplify making online purchases.
    • IOC-2.A.10 Commercial and governmental curation of information may be exploited if privacy and other protections are ignored.
    • IOC-2.A.11 Information placed online can be used in ways that were not intended and that may have a harmful impact. For example, an email message may be forwarded, tweets can be retweeted, and social media posts can be viewed by potential employers.
    • IOC-2.A.12 PII can be used to stalk or steal the identity of a person or to aid in the planning of other criminal acts.
    • IOC-2.A.13 Once information is placed online, it is difficult to delete.
    • IOC-2.A.14 Programs can collect your location and record where you have been, how you got there, and how long you were at a given location.
    • IOC-2.A.15 Information posted to social media services can be used by others. Combining information posted on social media and other sources can be used to deduce private information about you.

    Learning Objective IOC-2.B: Explain how computing resources can be protected and can be misused. [Skill 5.E]

    • IOC-2.B.1 Authentication measures protect devices and information from unauthorized access. Examples of authentication measures include strong passwords and multifactor authentication.
    • IOC-2.B.2 A strong password is something that is easy for a user to remember but would be difficult for someone else to guess based on knowledge of that user.
    • IOC-2.B.3 Multifactor authentication is a method of computer access control in which a user is only granted access after successfully presenting several separate pieces of evidence to an authentication mechanism, typically in at least two of the following categories: knowledge (something they know), possession (something they have), and inherence (something they are).
    • IOC-2.B.4 Multifactor authentication requires at least two steps to unlock protected information; each step adds a new layer of security that must be broken to gain unauthorized access.
    • IOC-2.B.5 Encryption is the process of encoding data to prevent unauthorized access. Decryption is the process of decoding the data. Two common encryption approaches are:
      • Symmetric key encryption involves one key for both encryption and decryption.
      • Public key encryption pairs a public key for encryption and a private key for decryption. The sender does not need the receiver's private key to encrypt a message, but the receiver's private key is required to decrypt the message.
      • Exclusion statement (EK IOC-2.B.5): Specific mathematical procedures for encryption and decryption are beyond the scope of this course and the AP Exam.
    • IOC-2.B.6 Certificate authorities issue digital certificates that validate the ownership of encryption keys used in secure communications and are based on a trust model.
    • IOC-2.B.7 Computer virus and malware scanning software can help protect a computing system against infection.
    • IOC-2.B.8 A computer virus is a malicious program that can copy itself and gain access to a computer in an unauthorized way. Computer viruses often attach themselves to legitimate programs and start running independently on a computer.
    • IOC-2.B.9 Malware is software intended to damage a computing system or to take partial control over its operation.
    • IOC-2.B.10 All real-world systems have errors or design flaws that can be exploited to compromise them. Regular software updates help fix errors that could compromise a computing system.
    • IOC-2.B.11 Users can control the permissions programs have for collecting user information. Users should review the permission settings of programs to protect their privacy.

    Learning Objective IOC-2.C: Explain how unauthorized access to computing resources is gained. [Skill 5.E]

    • IOC-2.C.1 Phishing is a technique that attempts to trick a user into providing personal information. That personal information can then be used to access sensitive online resources, such as bank accounts and emails.
    • IOC-2.C.2 Keylogging is the use of a program to record every keystroke made by a computer user in order to gain fraudulent access to passwords and other confidential information.
    • IOC-2.C.3 Data sent over public networks can be intercepted, analyzed, and modified. One way that this can happen is through a rogue access point.
    • IOC-2.C.4 A rogue access point is a wireless access point that gives unauthorized access to secure networks.
    • IOC-2.C.5 A malicious link can be disguised on a web page or in an email message.
    • IOC-2.C.6 Unsolicited emails, attachments, links, and forms in emails can be used to compromise the security of a computing system. These can come from unknown senders or from known senders whose security has been compromised.
    • IOC-2.C.7 Untrustworthy (often free) downloads from freeware or shareware sites can contain malware.
    العربية

    فهم دائم (IOC-2): قد يتضمن استخدام ابتكارات الحوسبة مخاطر على السلامة الشخصية والهوية.

    هدف التعلم IOC-2.A: صف المخاطر التي تهدد الخصوصية الناجمة عن جمع وتخزين البيانات الشخصية على نظام حاسوب. [مهارة 5.D]

    • IOC-2.A.1 المعلومات القابلة للتعرف عليها شخصيًا (PII) هي معلومات عن فرد تحدد أو تربط أو تتعلق أو تصفه. تشمل أمثلة PII ما يلي:
      • رقم الضمان الاجتماعي
      • العمر
      • العرق
      • أرقام الهاتف
      • المعلومات الطبية
      • المعلومات المالية
      • البيانات الحيوية
    • IOC-2.A.2 يمكن لمحركات البحث تسجيل والحفاظ على سجل لعمليات البحث التي قام بها المستخدمون.
    • IOC-2.A.3 يمكن للمواقع الإلكترونية تسجيل والحفاظ على سجل للأفراد الذين زاروا صفحاتهم.
    • IOC-2.A.4 يمكن للأجهزة والمواقع والشبكات جمع معلومات عن موقع المستخدم.
    • IOC-2.A.5 تمكن التكنولوجيا من جمع المعلومات عن الأفراد والمجموعات والمؤسسات، واستخدامها واستغلالها.
    • IOC-2.A.6 يمكن لمحركات البحث استخدام سجل البحث لاقتراح مواقع إلكترونية أو للتسويق الموجه.
    • IOC-2.A.7 يمكن تجميع بيانات شخصية متباينة، مثل تحديد الموقع الجغرافي وكوكيز وسجل التصفح، لإنشاء معرفة عن الفرد.
    • IOC-2.A.8 يمكن استخدام المعلومات القابلة للتعرف عليها شخصيًا وغيرها من المعلومات المنشرة عبر الإنترنت لتحسين تجارب المستخدمين عبر الإنترنت.
    • IOC-2.A.9 يمكن استخدام المعلومات القابلة للتعرف عليها شخصيًا المخزنة عبر الإنترنت لتبسيط عمليات الشراء عبر الإنترنت.
    • IOC-2.A.10 يمكن استغلال إدارة المعلومات التجارية والحكومية إذا تم تجاهل الخصوصية والحماية الأخرى.
    • IOC-2.A.11 يمكن استخدام المعلومات المنشرة عبر الإنترنت بطرق لم تكن مقصودة وقد يكون لها تأثير ضار. على سبيل المثال، قد يتم إعادة إرسال رسالة بريد إلكتروني، ويمكن إعادة نشر التغريدات، ويمكن لعرض منشورات وسائل التواصل الاجتماعي من قبل أصحاب عمل محتملين.
    • IOC-2.A.12 يمكن استخدام المعلومات القابلة للتعرف عليها شخصيًا لملاحقة أو سرقة هوية شخص ما أو للمساعدة في التخطيط لجرائم أخرى.
    • IOC-2.A.13 بمجرد وضع المعلومات عبر الإنترنت، يصبح حذفها أمرًا صعبًا.
    • IOC-2.A.14 يمكن للبرامج جمع موقعك وتسجيل أين كنت، وكيف وصلت إلى هناك، وكم مدة بقائك في موقع معين.
    • IOC-2.A.15 يمكن استخدام المعلومات المنشورة على خدمات وسائل التواصل الاجتماعي من قِبل آخرين. يمكن دمج المعلومات المنشورة على وسائل التواصل الاجتماعي ومصادر أخرى لاستنتاج معلومات خاصة بك.

    هدف التعلم IOC-2.B: اشرح كيفية حماية موارد الحوسبة وكيفية إساءة استخدامها. [مهارة 5.E]

    • IOC-2.B.1 تدفع تدابير التحقق من الهوية الأجهزة والمعلومات ضد الوصول غير المصرح به. تشمل أمثلة تدابير التحقق من الهوية كلمات المرور القوية والتحقق من الهوية متعدد العوامل.
    • IOC-2.B.2 كلمة المرور القوية هي شيء سهل التذكر للمستخدم ولكن يصعب تخمينه من قِبل شخص آخر بناءً على معرفة ذلك المستخدم.
    • IOC-2.B.3 التحقق من الهوية متعدد العوامل هو طريقة للتحكم في الوصول إلى الكمبيوتر حيث يُمنح المستخدم الوصول فقط بعد تقديم عدد من الأدلة المنفصلة بنجاح آلية التحقق من الهوية، عادةً في فئتين على الأقل من الفئات التالية: المعرفة (شيء يعرفونه)، والامتلاك (شيء يمتلكونه)، والطبيعة (شيء هم عليه).
    • IOC-2.B.4 يتطلب التحقق من الهوية متعدد عوامل خطوتين على الأقل لفك تشفير المعلومات المحمية؛ تضيف كل خطوة طبقة أمنية جديدة يجب كسرها للحصول على وصول غير مصرح به.
    • IOC-2.B.5 التشفير هو عملية تشفير البيانات لمنع الوصول غير المصرح به. الفك تشفير هو عملية فك تشفير البيانات. نهجان شائعان للتشفير هما:
      • تشفير المفتاح المتماثل يتضمن مفتاحًا واحدًا لكل من التشفير وفك التشفير.
      • تشفير المفتاح العام يربط مفتاحًا عامًا للتشفير ومفتاحًا خاصًا لفك التشفير. لا يحتاج المرسل إلى المفتاح الخاص للمستلم لتشفير رسالة، لكن المفتاح الخاص للمستلم مطلوب لفك تشفير الرسالة.
      • بيان الاستبعاد (EK IOC-2.B.5): الإجراءات الرياضية المحددة للتشفير وفك التشفير تقع خارج نطاق هذا المقرر وامتحان AP.
    • IOC-2.B.6 تُصدر جهات شهادة الوصول (Certificate Authorities) شهادات رقمية تؤكد ملكية مفاتيح التشفير المستخدمة في الاتصالات الآمنة، وهي مبنية على نموذج ثقة.
    • IOC-2.B.7 يمكن لبرامج فحص الفيروسات والبرمجيات الخبيثة أن تساعد في حماية نظام الحوسبة من العدوى.
    • IOC-2.B.8 الفيروس الكمبيوتر هو برنامج ضار يمكنه نسخ نفسه والدخول إلى جهاز كمبيوتر بطريقة غير مصرح بها. غالبًا ما ترتبط الفيروسات الكمبيوترية بالبرامج المشروعة وتبدأ في العمل بشكل مستقل على الجهاز.
    • IOC-2.B.9 البرمجيات الخبيثة هي برمجيات مقصودة لإضرار نظام الحوسبة أو الاستيلاء جزئيًا على تشغيله.
    • IOC-2.B.10 جميع الأنظمة الواقعية تحتوي على أخطاء أو عيوب تصميم يمكن استغلالها لتقويضها. تساعد التحديثات المنتظمة للبرمجيات في إصلاح الأخطاء التي قد تقوض نظام الحوسبة.
    • IOC-2.B.11 يمكن للمستخدمين التحكم في الصلاحيات الممنوحة للبرامج لجمع معلومات المستخدم. يجب على المستخدمين مراجعة إعدادات صلاحيات البرامج لحماية خصوصيتهم.

    هدف التعلم IOC-2.C: اشرح كيفية الحصول على وصول غير مصرح به إلى موارد الحوسبة. [مهارة 5.E]

    • IOC-2.C.1 التصيد الاحتيالي هو تقنية تحاول خداع المستخدم لتقديم معلومات شخصية. يمكن بعد ذلك استخدام هذه المعلومات للوصول إلى موارد حساسة عبر الإنترنت، مثل حسابات البنوك والرسائل الإلكترونية.
    • IOC-2.C.2 تسجيل المفاتيح هو استخدام برنامج لتسجيل كل ضغطة مفتاح يقوم بها مستخدم الكمبيوتر بهدف الحصول على وصول احتيالي لكلمات المرور والمعلومات السرية الأخرى.
    • IOC-2.C.3 يمكن اعتراض البيانات المرسلة عبر الشبكات العامة وتحليلها وتعديلها. إحدى الطرق التي يمكن أن يحدث بها ذلك هي من خلال نقطة وصول مزيفة.
    • IOC-2.C.4 نقطة الوصول المزيفة هي نقطة وصول لاسلكية تمنح وصولاً غير مصرح به إلى الشبكات الآمنة.
    • IOC-2.C.5 يمكن إخفاء الروابط الضارة في صفحة ويب أو في رسالة بريد إلكتروني.
    • IOC-2.C.6 يمكن استخدام الرسائل البريدية والإرفاقات والروابط والنماذج الواردة في البريد الإلكتروني غير المرغوب فيها لتقويض أمان نظام الحوسبة. يمكن أن تأتي هذه من مرسلين مجهولين أو من مرسلين معروفين تم تقويض أمنهم.
    • IOC-2.C.7 قد تحتوي التحميلات غير الموثوقة (والتي تكون مجانية غالبًا) من مواقع البرمجيات المجانية أو المجانية مع اشتراط على برمجيات خبيثة.

    Source: College Board AP Course and Exam Description · ⁨المصدر: وصف دورة وامتحان College Board AP⁩

    English

    Protecting personal data is a shared responsibility. Key ideas:

    • Personally identifiable information (PII) 个人身份信息 (name, address, ID numbers) should be shared carefully, because it can be misused for identity theft 身份盗窃.
    • Threats include phishing 网络钓鱼 (tricking you into revealing information), malware 恶意软件, and weak passwords.
    • A malicious link can be disguised on a web page or in an email message: the text you see and the address it actually goes to are separate, so a link reading www.yourbank.com can point anywhere. Hover to see the real destination before clicking, and be most suspicious of a link that arrives unexpectedly and creates urgency.
    • Defenses include strong, unique passwords, multi-factor authentication 多因素认证, encryption 加密 (scrambling data so only authorized people can read it), and keeping software updated.

    Encryption is the central tool for keeping data private in transit and storage. Being a responsible computer user means protecting your own and others' information.

    Exam skill: be able to identify the beneficial and harmful effects of a given innovation, explain a privacy or security risk, and name a safe-computing practice that addresses it.

    Worked example. A hiring algorithm is trained on a company's past hires, who were mostly one group, and it then rejects qualified applicants from other groups. Name the problem and its cause: this is computing bias, caused by biased training data — the model learned the historical pattern instead of a fair rule. A full-mark exam answer states the harm (qualified people are unfairly rejected) and its cause (the bias came from the data, not the code).

    العربية

    حماية البيانات الشخصية مسؤولية مشتركة. الأفكار الرئيسية:

    التشفير يعشش النص الواضح بمفتاح؛ لا يمكن إلا المفتاح فك تشفيره
    التشفير يعشش النص الواضح بمفتاح؛ لا يمكن إلا المفتاح فك تشفيره
    • يجب مشاركة المعلومات القابلة للتحديد الشخصي (PII) (مثل الاسم والعنوان وأرقام التعريف) بحذر، لأنها قد تُساء استخدامها لـ سرقة الهوية.
    • تشمل التهديدات الصيد الاحتيالي (إغرائك لكشف معلومات)، والبرمجيات الخبيثة، وكلمات المرور الضعيفة.
    • يمكن إخفاء رابط ضار في صفحة ويب أو رسالة بريد إلكتروني: فالنص الذي تراه وعنوان الوجهة الفعلية الذي ينقل إليه الرابط منفصلان، لذا فإن رابطًا يحمل نص www.yourbank.com قد يؤدي إلى أي مكان. مرر الفأرة فوق الرابط لرؤية الوجهة الحقيقية قبل النقر عليه، وكن مشكوكًا بشكل خاص تجاه الروابط التي تظهر بشكل غير متوقع وتخلق إحساسًا بالضرورة.
    • تشمل التدابير الوقائية كلمات مرور قوية وفريدة، والمصادقة متعددة العوامل، والتشفير (تعشيش البيانات بحيث لا يمكن قراءتها إلا للأشخاص المصرح لهم)، والحفاظ على تحديث البرامج.

    التشفير هو الأداة الأساسية للحفاظ على خصوصية البيانات أثناء النقل والتخزين. إن استخدام الحاسوب بمسؤولية يعني حماية معلوماتك الخاصة ومعلومات الآخرين.

    مهارة الامتحان: القدرة على تحديد الآثار الإيجابية والسلبية لابتكار محدد، وشرح مخاطر الخصوصية أو الأمن، وذكر ممارسة من ممارسات الحوسبة الآمنة تعالجها.

    مثال محلل. خوارزمية توظيف يتم تدريبها على توظيفات الشركة السابقة، الذين كانوا في الغالب من مجموعة واحدة، ثم ترفض المتقدمين المؤهلين من مجموعات أخرى. اذكر المشكلة وسببها: هذا هو التحيز الحاسوبي، الناتج عن بيانات تدريب متحيزة — فقد تعلم النموذج النمط التاريخي بدلاً من قاعدة عادلة. إجابة امتحان كاملة الدرجة تذكر الضرر (تم رفض أشخاص مؤهلين بشكل غير عادل) و سببه (الناتج من التحيز في البيانات، وليس الكود).

    Explore · ⁨استكشف⁩

    Scramble a message with encryption · ⁨تشفير رسالة عن طريق تشويشها⁩

    Encryption protects data by scrambling it with a key; only someone with the key can read it back. This simple Caesar cipher shifts each letter — real encryption uses the same idea with far stronger keys to keep passwords and messages safe. · ⁨التشفير يحمي البيانات عن طريق تشويشها بمفتاح؛ فقط من يمتلك المفتاح يمكنه قراءتها لاحقًا. هذا الشيفرة القيصرية البسيطة تُزيح كل حرف — التشفير الحقيقي يستخدم نفس الفكرة مع مفاهيم أقوى بكثير للحفاظ على كلمات المرور والرسائل آمنة.⁩

    Vocabulary · ⁨مفردات⁩ Train · ⁨تدريب⁩
    English العربية
    digital divide/ˈdɪdʒɪtl dɪˈvaɪd/ الفجوة الرقمية
    Bias/ˈbaɪəs/ التحيز
    Crowdsourcing/ˈkraʊdsɔːsɪŋ/ العمل الجماعي عبر الإنترنت
    Intellectual property/ˌɪntəˈlektʃuːəl ˈprɒpəti/ الملكية الفكرية
    copyright/ˈkɒpɪraɪt/ حقوق النشر
    Open-source/ˈəʊpən sɔːs/ مفتوح المصدر
    Plagiarism/ˈpleɪdʒərɪzəm/ السرقة الأدبية
    open access/ˈəʊpən ˈækses/ الوصول المفتوح
    Creative Commons/kriːˈeɪtɪv ˈkɒmənz/ كرياتيف كومنز
    Personally identifiable information (PII)/ˈpɜːsənəli aɪˈdentɪfaɪəbl ˌɪnfəˈmeɪʃn/ المعلومات الشخصية التي يمكن تحديد هوية شخص بها (PII)
    identity theft/aɪˈdentɪti θeft/ سرقة الهوية
    phishing/ˈfɪʃɪŋ/ التصيد الاحتيالي
    malware/ˈmælweə/ البرمجيات الخبيثة
    multi-factor authentication/ˈmʌlti ˈfæktə ɔːˌθentɪˈkeɪʃn/ المصادقة متعددة العوامل
    encryption/enˈkrɪpʃn/ تشفيراً
    open source/ˈəʊpən sɔːs/ المصدر المفتوح
    5.6

    Exam tips · ⁨نصائح للامتحان⁩

    English
    • Argue both the beneficial and harmful effects of a computing innovation — a balanced answer scores best.
    • Use correct terms for data concerns: PII, privacy, security, and algorithmic bias.
    • Explain how crowdsourcing and large data sets create value and raise new risks.
    • Distinguish the digital divide (access) from bias (fairness) and give a concrete example of each.
    • Tie every claim to a specific innovation and effect, as the written response demands.
    العربية
    • ناقش كلا الآثار الإيجابية والسلبية لابتكار حاسوبي — فإجابة متوازنة تحصل على أعلى درجة.
    • استخدم المصطلحات الصحيحة لقضايا البيانات: PII، والخصوصية، والأمن، والتحيز الخوارزمي.
    • اشرح كيف يولد الإسناد الجماعي ومجموعات البيانات الكبيرة قيمة ويثير مخاطر جديدة.
    • اميز بين الفجوة الرقمية (الإمكانية الوصول) والتحيز (العدالة)قدم مثالاً ملموسًا لكل منهما.
    • اربط كل ادعاء بابتكار وتأثير محددين، كما تتطلب الاستجابة المكتوبة.

Log in or create account · ⁨تسجيل الدخول أو إنشاء حساب⁩

IGCSE, A-Level & AP