(d) Understand and use the concepts of totalling and counting
(e) Understand and use the concept of string handling
• Including: – length – substring – upper – lower • The first character of the string can be position zero or one
(f) Understand and use arithmetic, relational and logical operators
• Arithmetic, limited to: – + – – – / – * – ^ (raised to power of) – MOD – DIV • Relational, limited to: – = – < – <= – > – >= – <> (not equal to) • Logical, limited to: – AND – OR – NOT
5 Understand and use nested statements
• Including nested selection and iteration • Candidates will not be required to write more than three levels of nested statements
6 (a) Understand what is meant by procedures, functions and parameters (b) Define and use procedures and functions, with or without parameters (c) Understand and use local and global variables
• Procedures and functions may have up to three parameters
7 Understand and use library routines
• Including: – MOD – DIV – ROUND – RANDOM
8 Understand how to create a maintainable program
• Including appropriate use of: – meaningful identifiers – the commenting feature provided by the programming language – procedures and functions – relevant and appropriate commenting of syntax • Use meaningful identifiers for: – variables – constants – arrays – procedures and functions
עברית
המועמדים צריכים להיות מסוגלים:
הערות והנחיות
1 הכרזה ושימוש במשתנים וקבועים
2 הבנה ושימוש בסוגי נתונים בסיסיים
• כולל: – שלם – אמיתי – character – מחרוזת – בוליאני
3 הבנה ושימוש בקלט ופלט
4 (א) הבנה ושימוש במושג רצף
(ב) הבנה ושימוש במושג בחירה
• כולל: – הודעות IF – הודעות CASE
(c) הבנה ושימוש במונח איטרציה
• כולל: – לולאות המבוססות על ספירה – לולאות עם תנאי מקדים – לולאות עם תנאי מאוחר
(d) הבנה ושימוש במושגי סיכום וספירה
(e) הבנה ושימוש במושג טיפול במחרוזות
• כולל: – אורך – תת-מחרוזת – האותיות הגדולות – האותיות הקטנות • התווית הראשונה של המחרוזת עשויה להיות מיקום אפס או אחד
• אריתמטיים, מוגבל ל: – + – – – / – * – ^ (העלאה לחזקה) – MOD – DIV • יחסיים, מוגבל ל: – = – < – <= – > – >= – <> (אי-שוויון) • לוגיים, מוגבל ל: – AND – OR – NOT
5 הבנה ושימוש בפקודות משולבות
• כולל בחירות ומחזוריות משולבים • מועמדים לא ידרשו לכתוב יותר משלושה רמות של פקודות משולבות
6 (א) הבנת המשמעות של פרוצדורות, פונקציות ופרמטרים (ב) הגדרה ושימוש בפרוצדורות ובפונקציות, עם או ללא פרמטרים (ג) הבנה ושימוש במשתנים מקומיים וגלובליים
• לפרוצדורות ולפונקציות יכולים להיות עד שלושה פרמטרים
7 הבנה ושימוש בתוכניות ספרייה
• כולל: – MOD – DIV – ROUND – RANDOM
8 הבנת אופן יצירת תוכנית נתונה לתחזוקה
• כולל שימוש מתאים ב: – זיהויים משמעותיים – מאפיין ההערות המסופק על ידי שפת התכנות – פרוצדורות ופונקציות – הערות רלוונטיות ומתאימות לסנטקס • השתמש בזיהויים משמעותיים עבור: – משתנים – קבועים – מערכים – פרוצדורות ופונקציות
Source: Cambridge International syllabus · מקור: הסיילבוס הבינלאומי של קמבריד'ג'
English
A variable 变量 is a named store that holds a value which can change while the program runs. A constant 常量 is a named store whose value is fixed and does not change.
You should declare 声明 them (say their name and type) before use:
Use a constant for a value that never changes (like Pi), so it is set in one place and is easy to read.
עברית
משתנה הוא מקום אחסון בעל שם המכיל ערך שיכול להשתנות בזמן הרצת התוכנית. קבוע הוא מקום אחסון בעל שם שערכו קבוע ואינו משתנה.
משתנה הוא אחסון בעל שם שערכו יכול להשתנותמשתנים וקבועים הם מקומות אחסון בעלי שם לערכים, מוגדרים בקוד התוכנית
יש להצהיר אותם (לומר את שמם וסוגם) לפני השימוש:
DECLARE Score : INTEGER
DECLARE Name : STRING
CONSTANT Pi ← 3.142
בזמן רצת התוכנית, המשתנים שלה מאוחזים בזיכרון המחשב (RAM)
השתמש בקבוע לערך שאינו משתנה (כמו Pi), כך שהוא מוגדר במקום אחד וקל לקריאה.
Explore · חקור
Variables and assignment
Step through the lines and watch each variable take its new value.
totalling 求和 — keep adding values to a running total: Total ← Total + Value.
counting 计数 — add 1 to a counter each time: Count ← Count + 1.
Worked example. A program must read 5 marks, then output the total and the average.
Two lines carry the marks. Total ← 0 must sit before the loop: put it inside and the total resets on every pass, so the program outputs only the last mark. And Average ← Total / 5 must sit after the loop, because the total is not complete until every mark has been added. Initialise before, calculate after - that ordering is what the question is really testing.
עברית
סיכום — להוסיף ערכים לסיכום נוכחי: Total ← Total + Value.
ספירה — להוסיף 1 למונה בכל פעם: Count ← Count + 1.
מדד סופר פונה כלפי מעלה ב-1; סכום מצטבר בונה סכום רצףטבלת מעקב עוקבת אחר לולאת סיכום וספירה צעד אחר צעד
Total ← 0
FOR I ← 1 TO 10
INPUT Mark
Total ← Total + Mark
NEXT I
OUTPUT Total
דוגמה פותרת. תוכנית חובה לקרוא 5 ציונים, ולאחר מכן להציג את הסכום והממוצע.
Total ← 0
FOR I ← 1 TO 5
INPUT Mark
Total ← Total + Mark
NEXT I
Average ← Total / 5
OUTPUT Total, Average
שתי שורות נושאות את הציונים. Total ← 0 חובה להיות לפני הלולאה: אם נשים אותה בתוך הלולאה, הסיכום יתאפס בכל מעבר, ולכן התוכנית תציג רק את הציון האחרון. וAverage ← Total / 5 חובה להיות אחרי הלולאה, משום שהסיכום אינו מלא עד שכל הציונים הוספו. אתחול לפני, חישוב אחרי – סדר זה הוא מה שהשאלה באמת בוחנת.
(האות הראשונה עשויה להיספר כמיקום 0 או כמיקום 1, בהתאם לשפה.)
Explore · חקור
SUBSTRING: take part of a string
The first character is at position 1. SUBSTRING(Word, Start, Length) takes Length characters beginning at Start — drag the two handles and read the call it builds.
Pick one and the site follows you — notes, papers, videos and practice all open on it. · בחרו נושא אחד והאתר יעקוב אחריו — הערות, מסמכים, וידאו ותרגולים פתוחים בו.
Type to search notes, lessons, code, vocabulary and past-paper questions across every subject. · הקלד כדי לחפש הערות, שיעורים, קוד, אוצר מילים ושאלות מבחנים בכל הנושאים.