Chapterبەش 5 · Lectureوانە 5.1

Programming Languages and Algorithmsزمانەکانی بەرنامەسازی و ئەلگۆریزمەکان

Plan a program with an algorithm, a flowchart and pseudocode, compare high- and low-level languages, explain compilers and interpreters, read the English keywords in code, and describe a process with sequence words and if-sentences.

بە ، و پلانی دابنێ، و بەراورد بکە، و ڕوون بکەرەوە، وشە ئینگلیزییەکانی ناو کۆد بخوێنەوە و پرۆسەیەک بە وشەی ڕیزبەندی و وەسف بکە.

12 min read17 خولەک خوێندنەوە · 19 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Explain what an algorithm, pseudocode and a flowchart are, and name the flowchart symbols.
  • Compare high-level and low-level languages, and compilers and interpreters.
  • Use the word families program, compile and debug correctly.
  • Describe a process with sequence words (first, then, next, finally) and if-sentences.
  • Read the English keywords in code aloud: if, else, while, for, return, true and false.
  • ڕوونی بکەرەوە ، و چین و هێماکانی بە ئینگلیزی ناو ببە.
  • و ، هەروەها و بەراورد بکە.
  • خێزانە وشەکانی program، compile و debug بە دروستی بەکاربهێنە.
  • پرۆسەیەک بە وشەی ڕیزبەندی (first, then, next, finally) و وەسف بکە.
  • ناو کۆد بە ئینگلیزی و بە دەنگی بەرز بخوێنەوە: if، else، while، for، return، true و false.

EN shows the lessons for English-speaking students; کوردی shows the lessons for Kurdish-speaking students. کوردی وانەکانی خوێندکارانی کوردزمان پیشان دەدات؛ EN وانەکانی خوێندکارانی ئینگلیزیزمان پیشان دەدات.

Warm-up: an algorithm for teaدەستپێک: ئەلگۆریزمێک بۆ چا

You follow algorithms every day. Here is one that every Kurdish tea house knows: how to make tea.

هەموو ڕۆژێک جێبەجێ دەکەیت. ئەمە یەکێکیانە کە هەموو چایخانەیەکی کوردی دەیزانێت: چۆن چا دروست بکەیت.

Making teaدروستکردنی چا
  1. Fill the kettle with water and boil it.

    کەتڵییەکە پڕ بکە لە ئاو و بیکوڵێنە.

  2. Put two spoons of black tea in the small teapot.

    دوو کەوچک چای ڕەش بخە ناو قۆرییە بچووکەکەوە.

  3. Pour hot water into the teapot, and put it on top of the kettle.

    ئاوی گەرم بکە بە قۆرییەکەدا و بیخە سەر کەتڵییەکە.

  4. Wait about ten minutes.

    نزیکەی دە خولەک چاوەڕێ بکە.

  5. Pour tea into a small glass. If the guest wants sugar, add sugar.

    چا بکە بە ئیستیکانێکی بچووکدا. ئەگەر میوانەکە شەکری دەوێت، شەکری تێ بکە.

  6. Repeat step 5 until every guest has a glass.

    هەنگاوی ٥ دووبارە بکەرەوە تا هەموو میوانێک ئیستیکانێکی هەبێت.

This list has the three building blocks of every program: sequence (steps in order), selection (if the guest wants sugar…) and repetition (repeat until every guest has a glass). An algorithm is exactly this: a clear list of steps that solves a problem.

ئەم لیستە هەر سێ بەردی بناغەی هەموو لەخۆ دەگرێت: ڕیزبەندی (sequence: هەنگاوەکان بە ڕیز)، هەڵبژاردن (selection: if میوانەکە شەکری دەوێت…) و دووبارەکردنەوە (repetition: repeat until هەموو میوانێک ئیستیکانێکی هەبێت). ڕێک ئەمەیە: لیستێکی ڕوونی هەنگاوەکان کە کێشەیەک چارەسەر دەکات.

Three small flowcharts from the tea algorithm. Sequence: four steps in order, from 'Boil the water' to 'Wait ten minutes'. Selection: after 'Pour a glass', a diamond asks 'Wants sugar?'. Yes leads to 'Add sugar'; No goes around it; both paths reach 'Give it to the guest'. Repetition: after 'Pour a glass', a diamond asks 'Every guest has a glass?'. No goes back to 'Pour a glass'; Yes leads to End.سێ هێڵکاریی ڕەوتی بچووک لە ئەلگۆریزمی چاکەوە. ڕیزبەندی: چوار هەنگاو بە ڕیز، لە کوڵاندنی ئاوەکەوە تا دە خولەک چاوەڕێکردن. هەڵبژاردن: دوای «ئیستیکانێک تێبکە» شێوەیەکی ئەڵماسی دەپرسێت «شەکری دەوێت؟». «بەڵێ» دەچێت بۆ «شەکری تێبکە»؛ «نەخێر» بە لایدا تێدەپەڕێت؛ هەردوو ڕێگا دەگەنە «بیدە بە میوانەکە». دووبارەکردنەوە: دوای «ئیستیکانێک تێبکە» شێوەیەکی ئەڵماسی دەپرسێت «هەموو میوانێک ئیستیکانی هەیە؟». «نەخێر» دەگەڕێتەوە بۆ «ئیستیکانێک تێبکە»؛ «بەڵێ» دەچێت بۆ کۆتایی.
The tea algorithm uses all three building blocks of a program: sequence, selection and repetition. چاکە هەر سێ بەردی بناغەی بەکاردەهێنێت: ڕیزبەندی، هەڵبژاردن و دووبارەکردنەوە.CêIT original
Quick checkپشکنینی خێراWhich step of the tea algorithm is a selection (a decision)?کام هەنگاوی چاکە هەڵبژاردنە (بڕیارە)؟

Key words 1: planning a programوشە سەرەکییەکان ١: پلاندانانی بەرنامەیەک

From the idea to the codeلە بیرۆکەوە بۆ کۆد
  • algorithmnoun/ˈælɡərɪðəm/
    A finite list of clear steps that solves a problem or does a task. Programmers often plan an algorithm with or a before they write the code.
    An algorithm must be clear: each step can mean only one thing.
    دەبێت ڕوون بێت: هەر هەنگاوێک دەبێت تەنها یەک واتای هەبێت.
  • pseudocodenoun (uncountable)/ˈsjuːdəʊkəʊd/
    — pseudo واتە «ساختە، نیمچە». پیتی pـی سەرەتا ناخوێندرێتەوە.
    A plan of a program written in short, simple lines that look like English, not in a real . It shows the steps of an , but a computer cannot run it.
    Write the pseudocode first, and then the real code.
    سەرەتا بنووسە، پاشان کۆدە ڕاستەقینەکە.
  • flowchartnoun/ˈfləʊtʃɑːt/
    A diagram that shows the steps of an with shapes and arrows: ovals for start and end, rectangles for actions, and diamonds for yes/no questions.
    The flowchart shows every decision as a diamond.
    هەموو بڕیارێک وەک چوارگۆشەیەکی لار پیشان دەدات.
  • programnoun / verb/ˈprəʊɡræm/
    — لە IT هەمیشە program دەنووسرێت. programme (بەریتانی) بۆ تەلەڤزیۆن و خوێندنە.
    A set of instructions that a computer follows to do a job. A program can be one small or many files working together.
    This program calculates the average of the marks.
    ئەم تێکڕای نمرەکان دەژمێرێت.
  • programming languagenoun/ˈprəʊɡræmɪŋ ˌlæŋɡwɪdʒ/
    A language with strict rules that people use to give instructions to a computer. PHP, JavaScript and Python are programming languages.
    Python and PHP are popular programming languages.
    Python و PHP دوو بەناوبانگن.
  • source codenoun (uncountable)/ˈsɔːs kəʊd/
    — code لێرەدا : a lot of code، نەک many codes.
    The text of a program as people write it in a programming language, for example the code in a .py, .php or .java file. The computer cannot run it directly: a or an translates it.
    Programmers write source code in a text editor or an IDE.
    لە یان دەنووسن.
  • software developer (programmer)noun/ˈsɒftweə dɪˌveləpə(r)/
    A person who designs, writes, tests and fixes . Many developers work in one area, for example web, mobile apps or games.
    My sister is a software developer at a bank in Erbil.
    خوشکەکەم لە بانکێک لە هەولێر.
  • bugnoun/bʌɡ/
    A mistake in a program that makes it behave wrongly. Some bugs cause error messages; others quietly give wrong results.
    There's a bug on the login page: it accepts an empty password.
    لە لاپەڕەی هەیە: بەتاڵ قبووڵ دەکات.
  • debuggingnoun/ˌdiːˈbʌɡɪŋ/
    — کارەکەی to debugـە: دۆزینەوە و لابردن.
    Finding and fixing in a program. Common methods: read the error message, print values (print() in Python, echo or var_dump() in PHP), trace the code by hand and test small parts.
    Debugging took longer than writing the program.
    لە نووسینی زیاتر کاتی برد.
1947: engineers found a moth inside the Harvard Mark II computer and wrote 'first actual case of bug being found'. Programmers still call errors bugs.ساڵی ⁦1947⁩: ئەندازیاران پەپوولەیەکیان لەناو ⁦Harvard Mark II⁩ دۆزییەوە و نووسیان «first actual case of bug being found». بەرنامەسازان هێشتا بە دەڵێن .U.S. Naval History and Heritage Command, via Wikimedia Commons · Public domain

The full story of this bug, and what programming is, are in the Fundamentals of Programming lesson Why mistakes are called bugs.

چیرۆکی تەواوی ئەم و ئەوەی چییە، لە وانەی بۆچی هەڵەکان پێیان دەوترێت باگ؟ لە بنەماکانی .

Quick checkپشکنینی خێراWhat do we call a mistake in a program?هەڵەیەک لە بە ئینگلیزی چی پێ دەوترێت؟

Reading: from an idea to an appخوێندنەوە: لە بیرۆکەوە بۆ ئەپ

Readingخوێندنەوە
A program for the supermarketبەرنامەیەک بۆ سوپەرمارکێتەکە

Aram is a second-year computer science student in Erbil. His uncle has a small supermarket, and every evening he adds up the day's sales by hand. Aram decided to write a program to do it for him.

First, he made sure that he understood the problem. What information goes in? What should come out? He talked to his uncle and wrote everything down.

Next, he planned the solution. He wrote an in and drew a . This helped him to see every decision before he wrote any real code.

Then he wrote the in Python, a . High-level languages use English words like if, while and print, so people can read them easily. A computer, however, only understands : long lists of 0s and 1s. Python is usually run by an , which translates the program and runs it step by step. Other languages, like C, use a , which translates the whole program into machine code before it runs.

After that, Aram tested the program with real numbers from the shop. He found two bugs. The first was a syntax error, a missing bracket, and Python showed an error message at once. The second was a : the program ran, but the total was wrong because it forgot the last sale of the day. it took an hour.

Finally, he wrote short instructions for his uncle. Now the day's sales are added up in two seconds.

Kurdish translationوەرگێڕانی کوردی

ئارام خوێندکاری قۆناغی دووەمی زانستی لە هەولێر. مامی سوپەرمارکێتێکی بچووکی هەیە و هەموو ئێوارەیەک بە دەست فرۆشی ڕۆژەکە کۆ دەکاتەوە. ئارام بڕیاری دا بنووسێت کە ئەم کارەی بۆ بکات.

سەرەتا دڵنیا بووەوە کە لە کێشەکە تێگەیشتووە. چ زانیارییەک دەچێتە ژوورەوە؟ دەبێت چی بێتە دەرەوە؟ قسەی لەگەڵ مامی کرد و هەموو شتێکی نووسییەوە.

دواتر پلانی چارەسەرەکەی دانا. بە نووسی و کێشا. ئەمە یارمەتی دا پێش ئەوەی هیچ کۆدێکی ڕاستەقینە بنووسێت، هەموو بڕیارێک ببینێت.

پاشان بە Python نووسی، کە . وشەی ئینگلیزیی وەک if، while و print بەکاردەهێنن، بۆیە خەڵک بە ئاسانی دەیانخوێننەوە. بەڵام تەنها تێدەگات: لیستی درێژی ٠ و ١. Python زۆرجار بە کار دەکات کە وەردەگێڕێت و هەنگاو بە هەنگاو جێبەجێی دەکات. زمانەکانی تر، وەک C، بەکاردەهێنن کە هەموو پێش کارکردن وەردەگێڕێتە سەر .

دوای ئەوە، ئارام بە ژمارەی ڕاستەقینەی دووکانەکە تاقی کردەوە. دوو دۆزییەوە. یەکەمیان بوو، کەوانەیەک کەم بوو و Python دەستبەجێ پیشان دا. دووەمیان بوو: کاری کرد، بەڵام کۆی گشتی هەڵە بوو، چونکە دوایین فرۆشی ڕۆژەکەی لە بیر دەچوو. کاتژمێرێکی خایاند.

لە کۆتاییدا ڕێنمایی کورتی بۆ مامی نووسی. ئێستا فرۆشی ڕۆژەکە لە دوو چرکەدا کۆ دەکرێتەوە.

Quick checkپشکنینی خێراWhat did Aram do before he wrote any real code?ئارام پێش نووسینی هەر کۆدێکی ڕاستەقینە چی کرد؟

Quick checkپشکنینی خێراThe program ran, but the total was wrong. What kind of error was this? کاری کرد، بەڵام کۆی گشتی هەڵە بوو. ئەمە چ جۆرە هەڵەیەک بوو؟

Review questionsپرسیارەکانی پێداچوونەوە
Put Aram's steps in order.هەنگاوەکانی ئارام ڕیز بکە.

Understand the problem → plan the solution (algorithm, pseudocode, flowchart) → write the source code → translate and run it → test and debug → write instructions (documentation).

تێگەیشتن لە کێشەکە ← پلانی چارەسەر (، ، ) ← نووسینی ← وەرگێڕان و کارپێکردن ← و ← نووسینی ڕێنمایی ().

Key words 2: languages and translatorsوشە سەرەکییەکان ٢: زمانەکان و وەرگێڕەکان

From English-like code to 0s and 1sلە کۆدی وەک ئینگلیزییەوە بۆ ٠ و ١
  • high-level languagenoun/ˌhaɪ ˌlevl ˈlæŋɡwɪdʒ/
    A that uses words and symbols close to human language, so people can read and write it easily. A or an translates it for the computer. PHP, Python and Java are high-level languages.
    Python, Java and PHP are high-level languages.
    Python، Java و PHP .
  • low-level languagenoun/ˌləʊ ˌlevl ˈlæŋɡwɪdʒ/
    A that is close to the computer's own instructions, such as or . It is fast and gives full control, but it is hard for people to read.
    Low-level languages are close to the hardware and hard for people to read.
    نزیکن لە و خوێندنەوەیان بۆ مرۆڤ قورسە.
  • machine codenoun (uncountable)/məˈʃiːn kəʊd/
    Instructions written only in numbers (0s and 1s) that the can run directly. It is the only language the processor understands, so programs in other languages must be translated first.
    The CPU can only run machine code: instructions made of 0s and 1s.
    تەنها دەتوانێت جێبەجێ بکات: فەرمانی پێکهاتوو لە ٠ و ١.
  • assembly languagenoun/əˈsembli ˌlæŋɡwɪdʒ/
    A that uses short words such as MOV and ADD for each instruction. A program called an assembler turns it into machine code.
    In assembly language, short words like MOV and ADD stand for machine instructions.
    لە ، وشەی کورتی وەک MOV و ADD لە جیاتی فەرمانەکانی ئامێر دادەنرێن.
  • assemblernoun/əˈsemblə(r)/
    A that translates into . It does for assembly language what a does for a .
    An assembler turns assembly language into machine code.
    دەکات بە .
  • compilernoun/kəmˈpaɪlə(r)/
    A program that translates a whole program's source code before it runs: into machine code (C, C++) or into for a virtual machine (Java's javac). Python and PHP do this step automatically when they run a file.
    The compiler found three errors before the program could run.
    پێش ئەوەی کار بکات سێ هەڵەی دۆزییەوە.
  • interpreternoun/ɪnˈtɜːprɪtə(r)/
    A program that reads source code and runs it statement by statement, without first making a separate machine-code file. Python and PHP are run by interpreters (which first turn the code into behind the scenes).
    The interpreter stops at the first line with an error.
    لە یەکەم دێڕی هەڵەدار دەوەستێت.
  • syntax errornoun/ˈsɪntæks ˌerə(r)/
    An error found before a program runs, because the code breaks the rules — for example a missing : in Python or a missing ; in PHP. Nothing in that file runs; Python reports SyntaxError, PHP Parse error.
    A missing semicolon is a common syntax error in PHP.
    نەبوونی باوە لە PHP.
  • logic errornoun/ˈlɒdʒɪk ˌerə(r)/
    A mistake in the logic of a . The program runs with no , but the result is wrong, for example because it uses > where it should use >=.
    A logic error does not stop the program. It just gives the wrong answer.
    ناوەستێنێت. تەنها وەڵامی هەڵە دەدات.
Three levels of programming language, each doing the same small calculation. At the top, one line of a high-level language: total = 5 + 3. Below it, in the group of low-level languages, the same work in assembly language (MOV AL, 5 / ADD AL, 3 / MOV total, AL) and in machine code (rows of 0s and 1s for an x86 processor). Arrows show that a compiler or an interpreter turns high-level code into machine code, and an assembler turns assembly language into machine code.سێ ئاستی زمانی بەرنامەسازی، هەر یەکەیان هەمان ژماردنی بچووک دەکات. لە سەرەوە دێڕێکی زمانی ئاستبەرز: total = 5 + 3. لە خوارەوە، لە گرووپی زمانە ئاستنزمەکاندا، هەمان کار بە زمانی ئەسێمبلی (MOV AL, 5 / ADD AL, 3 / MOV total, AL) و بە کۆدی ئامێر (ڕیزی ٠ و ١ بۆ پرۆسێسەری x86). تیرەکان پیشان دەدەن کە کۆمپایلەر یان ئینتەرپرێتەر کۆدی ئاستبەرز دەکات بە کۆدی ئامێر و ئەسێمبلەر زمانی ئەسێمبلی دەکات بە کۆدی ئامێر.
One small calculation at three levels. The CPU runs only machine code, so code at the other two levels must be translated first.یەک ژماردنی بچووک لە سێ ئاستدا. تەنها جێبەجێ دەکات، بۆیە کۆدی دوو ئاستەکەی تر دەبێت سەرەتا وەربگێڕدرێت.CêIT original
Compiler or interpreter? یان ؟
PointخاڵCompilerInterpreter
How it translatesچۆن وەردەگێڕێتthe whole program at once, before it runsهەموو بە یەکجار، پێش کارکردنone statement at a time, while the program runsیەک لە هەر جارێکدا، لە کاتی کارکردندا
What it makesچی دروست دەکاتa separate machine-code file (for example an .exe file) جیای (بۆ نموونە ‎⁦.exe⁩)no separate file: it is needed every time the program runsهیچ جیا نییە: هەموو جارێک کە کار دەکات پێویستە
Errorsهەڵەکانlisted together after compilingدوای وەرگێڕان پێکەوە لیست دەکرێنthe program stops at the first error لە یەکەم هەڵەدا دەوەستێت
Speedخێراییthe finished program usually runs faster زۆرجار خێراتر کار دەکاتusually slower, but quicker to test and changeزۆرجار خاوترە، بەڵام تاقیکردنەوە و گۆڕینی خێراترە
ExamplesنموونەC, C++, GoPHP, JavaScript, Python (usually)PHP، JavaScript، Python (زۆرجار)

The levels of languages are taught in Low-level and high-level languages, and how a translated program becomes machine instructions in From your code to machine instructions.

ئاستەکانی زمان لە زمانە ئاستنزمەکان و زمانە ئاستبەرزەکان فێر دەکرێن و وەرگێڕدراو چۆن دەبێتە ئامێر لە لە کۆدەکەتەوە بۆ ڕێکارنامەکانی ئامێر.

Quick checkپشکنینی خێراWhich sentence is true?کام ڕستە ڕاستە؟

Interpreters and Compilers (Bits and Bytes, Episode 6)Bits and Bytes TVO · Englishئینگلیزی · 352K viewsبینین · 8.7K likesلایک

A calm short cartoon: how an interpreter translates one line at a time, how a compiler translates the whole program, and the key terms.

کارتۆنێکی کورت و ئارام: چۆن دێڕ بە دێڕ وەردەگێڕێت، چۆن هەموو پێکەوە وەردەگێڕێت و زاراوە سەرەکییەکان.

Whole video: how interpreters and compilers translate a program.

هەموو ڤیدیۆکە: و چۆن وەردەگێڕن.

Word focus: program, compile, debugوشە: program، compile، debug

One root gives many words. -er/-or often means a person or a tool (programmer, compiler), -ing and -ion name an activity (programming, compilation), and -able means “can be done” (executable = can be run).

یەک ڕەگ چەندین وشە دروست دەکات. -er / -or زۆرجار کەس یان ئامراز دەگەیەنێت (programmer، compiler)، -ing و -ion ناوی چالاکییەکن (programming، compilation) و -able واتە «دەکرێت بکرێت» (executable = دەکرێت کار پێ بکرێت). ئەمانە .

Word familiesخێزانە وشەکان
VerbکارActivity or thingچالاکی یان شتPerson or toolکەس یان ئامرازAdjectiveئاوەڵناو
programprogramming, a programprogrammerprogrammable
compilecompilationcompilercompiled
debugdebugging, a bugdebuggerbuggy
executeexecution—executable
specifyspecification—specific
Exerciseڕاهێنان

Complete each sentence with the right form of the word.

هەر ڕستەیەک بە شێوەی دروستی وشەکە تەواو بکە.

  1. Aram is a good . He writes programs every day. (program)ئارام باشە. هەموو ڕۆژێک دەنووسێت.
  2. is the job of writing programs. (program) کاری نووسینی .
  3. C++ code must be before it can run. (compile)کۆدی ⁦C++⁩ دەبێت پێش کارکردن وەربگێڕدرێت.
  4. I spent the whole evening my code. (debug)هەموو ئێوارەکەم بە کۆدەکەمەوە بەسەر برد.
  5. A is a tool that runs your code step by step to find bugs. (debug)ئامرازێکە کە کۆدەکەت هەنگاو بە هەنگاو کار پێ دەکات بۆ دۆزینەوەی .
  6. An .exe file is an file: you can run it. (execute) ‎⁦.exe⁩ جێبەجێکراوە: دەتوانیت کاری پێ بکەیت.

Language focus: describing a processزمان: وەسفکردنی پرۆسەیەک

Words for describing an algorithmوشە بۆ وەسفکردنی
JobئەرکWordsوشەکانExampleنموونە
Order of stepsڕیزبەندیی هەنگاوەکانFirst, … Then … Next, … After that, … Finally, …First, the program sets the counter to 0. Then it asks for the PIN.
A decisionبڕیارIf …, … / If not, … / Otherwise, …If the PIN is correct, the program shows “Welcome”. If not, it adds 1 to the counter.
Repetitionدووبارەکردنەوەrepeat … until … / while …It repeats these steps until the PIN is correct.
Purposeمەبەستto + verbThe program uses a counter to count the attempts.

To describe a process, use the present simple (the program checks…) or the present passive (the PIN is checked), and join the steps with sequence words. For decisions, use the zero conditional, if + present simple, present simple: If the PIN is wrong, the counter goes up by one. Don't use will: the result happens every time, so it is a fact, not a prediction.

بۆ وەسفکردنی پرۆسەیەک بەکاربهێنە (the program checks…) و هەنگاوەکان بە وشەی ڕیزبەندی ببەستەوە: First = یەکەم/سەرەتا، Then = پاشان، Next = دواتر، After that = دوای ئەوە، Finally = لە کۆتاییدا.

بۆ بڕیار بەکاربهێنە: If the PIN is wrong, the counter goes up by one. لە کوردیدا دوای «ئەگەر» کار بە شێوەی داخوازی دێت: «ئەگەر PINەکە هەڵە بێت». بەڵام لە ئینگلیزیدا دوای if دێت: If the PIN is wrong، نەک If the PIN will be wrong یان If the PIN be wrong.

Quick checkپشکنینی خێراWhich sentence is correct?کام ڕستە دروستە؟

Language focus: describing a processزمان: وەسفکردنی پرۆسەیەک

If not, otherwise, until, whileIf not، otherwise، until، while

For the other branch, use if not or otherwise. For loops, use until (stop when something becomes true) or while (continue as long as something is true). Note that until and while say the opposite: repeat until the PIN is correct = repeat while the PIN is wrong.

ئینگلیزی هەمیشە بکەری پێویستە. لە کوردیدا دەڵێین «ئەگەر هەڵە بێت، دەوەستێت» و بکەر لە کۆتایی کارەکەدا دیارە. لە ئینگلیزیدا دەبێت it بنووسیت: If it is wrong, it stops.، نەک If is wrong, stops. بۆ دووبارەکردنەوە: until = «تا ئەو کاتەی»، while = «هەتا… بێت».

Exerciseڕاهێنان

Describe the PIN algorithm. Write one word in each gap.

PIN وەسف بکە. لە هەر بۆشاییەکدا یەک وشە بنووسە.

  1. , the program sets the counter to zero.سەرەتا دەکات بە سفر.
  2. it asks the user for the PIN.پاشان داوای PIN لە دەکات.
  3. If the PIN correct, the program shows “Welcome”.ئەگەر PINەکە دروست بێت، «Welcome» پیشان دەدات.
  4. If , the counter goes up by one.ئەگەر نا، یەک زیاد دەبێت.
  5. If the counter is equal three, the card is blocked.ئەگەر یەکسان بێت بە سێ، کارتەکە بلۆک دەکرێت.
  6. The program repeats these steps the PIN is correct or the counter reaches three. ئەم هەنگاوانە دووبارە دەکاتەوە تا PINەکە دروست دەبێت یان دەگاتە سێ.

One algorithm, two ways: flowchart and pseudocodeیەک ئەلگۆریزم، دوو ڕێگا: هێڵکاریی ڕەوت و نیمچەکۆد

Programmers plan with two tools. A flowchart shows the steps as shapes joined by arrows. Pseudocode writes the same steps as short, English-like lines. Neither one is a real programming language, so a computer can't run them, but every programmer can read them. The full lesson, with worked examples, is Algorithms, Pseudocode and Flowcharts in Fundamentals of Programming.

بە دوو ئامراز پلان دادەنێن. هەنگاوەکان وەک شێوەی بەیەکەوە بەستراو بە تیر پیشان دەدات. هەمان هەنگاوەکان وەک دێڕی کورتی وەک ئینگلیزی دەنووسێت. هیچیان ڕاستەقینە نین، بۆیە ناتوانێت جێبەجێیان بکات، بەڵام هەموو دەتوانێت بیانخوێنێتەوە. وانە تەواوەکە، بە نموونەی چارەسەرکراوەوە، ئەلگۆریزمەکان، نیمچەکۆد و هێڵکارییەکانی ڕەوتـە لە بنەماکانی .

The five flowchart symbols: a rounded box for start or end (terminator), a rectangle for a process, a parallelogram for input or output, a diamond for a decision, and an arrow for the flow line.پێنج هێمای هێڵکاریی ڕەوت: لاکێشەی خڕ بۆ دەستپێک یان کۆتایی، لاکێشە بۆ پرۆسە، لاکێشەی لار بۆ نێوخستە یان دەرخستە، چوارگۆشەی لار بۆ بڕیار و تیر بۆ هێڵی ڕەوت.
The five flowchart symbolsپێنج هێمای
Quick checkپشکنینی خێراWhich flowchart shape do you use for “INPUT pin”?بۆ INPUT pin کام شێوەی بەکاردەهێنیت؟

Flow chart to psuedocode (computer)Jacob Sichamba Online Math · Englishئینگلیزی · 192K viewsبینین · 4.3K likesلایک · Partبەشی 0:26–6:56 (ofلە 7:13)

Learn what each flowchart shape means and how to turn a flowchart into pseudocode, step by step.

فێردەبیت هەر شێوەیەکی واتای چییە و چۆن بکەیتە ، هەنگاو بە هەنگاو.

Watch 0:26–6:56: flowchart shapes and turning a flowchart into pseudocode.

لە ⁦0:26⁩ تا ⁦6:56⁩ سەیر بکە: شێوەکانی و گۆڕینی بۆ .

One algorithm, two ways: flowchart and pseudocodeیەک ئەلگۆریزم، دوو ڕێگا: هێڵکاریی ڕەوت و نیمچەکۆد

The PIN algorithmئەلگۆریزمی PIN

The same PIN algorithm as a flowchart and as 12 lines of pseudocode. The user has three tries to enter the saved PIN. If the PIN is correct, the output is “Welcome”. If not, attempts goes up by one; at 3 attempts the output is “Card blocked”, otherwise the flow goes back to INPUT pin. Matching colours link each shape to its line.هەمان ئەلگۆریزمی PIN وەک هێڵکاریی ڕەوت و وەک ١٢ دێڕی نیمچەکۆد. بەکارهێنەرەکە سێ هەلی هەیە بۆ نووسینی PINـە پاشەکەوتکراوەکە. ئەگەر دروست بێت، دەرخستەکە «Welcome»ـە. ئەگەر نا، attempts یەک زیاد دەبێت؛ لە سێیەم هەوڵدا دەرخستەکە «Card blocked»ـە، ئەگەرنا دەگەڕێتەوە بۆ INPUT pin. ڕەنگە هاوشێوەکان هەر شێوەیەک بە دێڕەکەیەوە دەبەستنەوە.
A cash machine checks a PIN: the same algorithm as a flowchart and as pseudocode.ئامێری پارە PIN دەپشکنێت: هەمان وەک و وەک .

Follow the purple arrow: when the PIN is wrong and attempts is not yet 3, the algorithm goes back to INPUT pin. That is a loop (REPEAT … UNTIL). Each blue diamond is a decision (IF … THEN). Notice the English: almost every line of pseudocode is an English word in capital letters.

تیرە مۆرەکە بگرە: کاتێک PINەکە هەڵەیە و attempts هێشتا نەگەیشتووەتە ٣، دەگەڕێتەوە بۆ ⁦INPUT pin⁩. ئەمە (REPEAT … UNTIL). هەر چوارگۆشەیەکی لاری شین بڕیارێکە (IF … THEN). سەرنجی ئینگلیزییەکە بدە: نزیکەی هەموو دێڕێکی وشەیەکی ئینگلیزییە بە پیتی گەورە.

Quick checkپشکنینی خێراTest the algorithm with a dry run. The saved PIN is 2580. The user types 1111, then 2580. What happens? بە جێبەجێکردنی دەستی تاقی بکەرەوە. PINـە پاشەکەوتکراوەکە ⁦2580⁩ـە. سەرەتا ⁦1111⁩ دەنووسێت، پاشان ⁦2580⁩. چی ڕوو دەدات؟

ExerciseڕاهێنانWriting: describe the algorithm in wordsنووسین: ئەلگۆریزمەکە بە وشە وەسف بکە

Describe the PIN algorithm in 5–7 English sentences, for someone who can't read flowcharts. Use First, Then, If…, If not…, until and Finally.

PIN بە ٥–٧ ڕستەی ئینگلیزی وەسف بکە، بۆ کەسێک کە ناتوانێت بخوێنێتەوە. First, Then, If…, If not…, until و Finally بەکاربهێنە.

Show answerوەڵامەکە پیشان بدە
Readingخوێندنەوە
Model answerوەڵامی نموونە

First, the program sets the number of attempts to zero. Then it asks the user to type their PIN. If the PIN is the same as the saved PIN, the program shows “Welcome” and stops. If not, it adds one to the number of attempts. If the number of attempts is three, the program shows “Card blocked” and stops. Otherwise, it asks for the PIN again. The program repeats these steps until the PIN is correct or the user has tried three times.

Kurdish translationوەرگێڕانی کوردی

سەرەتا ژمارەی هەوڵەکان دەکات بە سفر. پاشان داوا لە دەکات PINـەکەی بنووسێت. ئەگەر PINـەکە وەک PINـە پاشەکەوتکراوەکە بێت، «Welcome» پیشان دەدات و دەوەستێت. ئەگەر نا، یەک بۆ ژمارەی هەوڵەکان زیاد دەکات. ئەگەر ژمارەی هەوڵەکان سێ بێت، «⁦Card blocked⁩» پیشان دەدات و دەوەستێت. ئەگەرنا، دووبارە داوای PIN دەکات. ئەم هەنگاوانە دووبارە دەکاتەوە تا PINـەکە دروست دەبێت یان سێ جار هەوڵ دەدات.

Reading the English in codeخوێندنەوەی ئینگلیزیی ناو کۆد

Most programming languages use English keywords. If you know what the English words mean, you can often guess what a piece of code does, even in a language you have never learned.

زۆربەی ئینگلیزی بەکاردەهێنن. ئەگەر واتای وشە ئینگلیزییەکان بزانیت، زۆرجار دەتوانیت مەزەندە بکەیت پارچە کۆدێک چی دەکات، تەنانەت بە زمانێکیش کە هەرگیز فێری نەبوویت.

Keywords and their English meaning و واتا ئینگلیزییەکەیان
KeywordEveryday Englishواتای ڕۆژانەWhat it does in codeلە کۆددا چی دەکات
ifon condition thatئەگەرruns a block only when a condition is trueبلۆکێک تەنها کاتێک جێبەجێ دەکات کە ڕاست بێت
elseotherwiseئەگەرناruns another block when the condition is falseکاتێک هەڵە بێت بلۆکێکی تر جێبەجێ دەکات
whileduring the time thatهەتا، لە کاتێکداrepeats a block as long as a condition is trueهەتا ڕاست بێت بلۆکێک دووبارە دەکاتەوە
forfor each (value of a counter)بۆ هەر (نرخێکی )repeats a block a fixed number of timesبلۆکێک ژمارەیەکی دیاریکراو جار دووبارە دەکاتەوە
returngive backگەڕاندنەوەsends a value back from a function and ends itنرخێک لە دەگەڕێنێتەوە و کۆتایی پێ دەهێنێت
true / falsecorrect / not correctڕاست / هەڵەthe two Boolean valuesدوو نرخەکەی
Quick checkپشکنینی خێراWhich keyword repeats a block as long as a condition is true?کام بلۆکێک دووبارە دەکاتەوە هەتا ڕاست بێت؟

Programming Basics: Statements & Functions: Crash Course Computer Science #12CrashCourse · Englishئینگلیزی · 1M viewsبینین · 18K likesلایک · Partبەشی 2:45–8:32 (ofلە 11:56)

Hear the English keywords of code used in real examples: if, else, while, for and functions, explained step by step.

کۆد بە ئینگلیزی و لە نموونەی ڕاستەقینەدا دەبیستیت: if، else، while، for و ، کە هەنگاو بە هەنگاو ڕوون دەکرێنەوە.

Watch 2:45–8:32: if, while, for and functions explained.

لە ⁦2:45⁩ تا ⁦8:32⁩ سەیر بکە: ڕوونکردنەوەی ، ، و .

Reading the English in codeخوێندنەوەی ئینگلیزیی ناو کۆد

A short program to read aloudبەرنامەیەکی کورت بۆ خوێندنەوە بە دەنگی بەرز

Read it aloud: if, else, return, true, false, for, whileبە دەنگی بەرز بیخوێنەوە: if، else، return، true، false، for، whilemarks.phpPHPRuns on the serverلەسەر ڕاژەکاری وێب کار دەکات
<?php
function hasPassed(int $mark): bool
{
    if ($mark >= 50) {
        return true;
    } else {
        return false;
    }
}

$marks = [72, 45, 90];
for ($i = 0; $i < count($marks); $i++) {
    if (hasPassed($marks[$i])) {
        echo "Student " . ($i + 1) . ": passed<br>";
    } else {
        echo "Student " . ($i + 1) . ": failed<br>";
    }
}

$seconds = 3;
while ($seconds > 0) {
    echo $seconds . "... ";
    $seconds--;
}
echo "Go!";
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 2

“function has passed”: it takes an int (an integer, a whole number) and returns a bool (a Boolean: true or false).

function has passed: int وەردەگرێت () و bool دەگەڕێنێتەوە (: true یان false).

Lineدێڕی 4-8

“If the mark is greater than or equal to fifty, return true. Else, return false.”

«ئەگەر نمرەکە گەورەتر یان یەکسان بێت بە پەنجا، true بگەڕێنەوە. ئەگەرنا، false بگەڕێنەوە.»

Lineدێڕی 11

$marks is an array: a list of values. $marks[$i] means “element number i” (the index starts at 0).

$marks : لیستێک لە . $marks[$i] واتە « ژمارە i» ( لە 0ـەوە دەست پێدەکات).

Lineدێڕی 12

“For i from zero, while i is less than the number of marks, add one to i.”

«بۆ i لە سفرەوە، هەتا i لە ژمارەی نمرەکان بچووکتر بێت، یەک بۆ i زیاد بکە.»

Lineدێڕی 21-24

“While seconds is greater than zero, print seconds, then take one away.”

«هەتا seconds لە سفر گەورەتر بێت، seconds چاپ بکە، پاشان یەکی لێ کەم بکەرەوە.»

Quick checkپشکنینی خێراWhat does hasPassed(45) return?hasPassed(45) چی دەگەڕێنێتەوە؟

Reading the English in codeخوێندنەوەی ئینگلیزیی ناو کۆد

Saying operators in wordsخوێندنەوەی کارپێکەرەکان بە وشە

Saying operators in wordsخوێندنەوەی بە وشە
SymbolهێماSayبڵێMeaningواتا
==is equal tothe same valueیەکسانە بە
!=is not equal toa different valueیەکسان نییە بە
<is less thansmallerبچووکترە لە
>is greater thanbiggerگەورەترە لە
<=is less than or equal tosmaller or the sameبچووکترە یان یەکسانە
>=is greater than or equal tobigger or the sameگەورەترە یان یەکسانە
&& / andandboth must be trueهەردووکیان دەبێت ڕاست بن
|| / ororat least one must be trueلانیکەم یەکێکیان دەبێت ڕاست بێت
Quick checkپشکنینی خێراHow do you read $attempts < 3 aloud?$attempts < 3 چۆن بە دەنگی بەرز دەخوێنیتەوە؟

Listen: at the coding clubگوێ بگرە: لە یانەی کۆدنووسین

Dialogueگفتوگۆ
“Have you ever written a program?”«تا ئێستا بەرنامەیەکت نووسیوە؟»
Dilan

Hi, Aram! Is this the coding club?

سڵاو ئارام! ئەمە یانەی کۆدنووسینە؟

Aram

Yes, come in! Have you ever written a program?

بەڵێ، وەرە ژوورەوە! تا ئێستا نووسیوە؟

Dilan

Only a little. I've made a simple web page with HTML, but I've never used a real programming language.

تەنها کەمێک. سادەم بە HTML دروست کردووە، بەڵام هەرگیز ڕاستەقینەم بەکارنەهێناوە.

Aram

Actually, HTML is a markup language, not a programming language. It describes a page, but it can't make decisions.

لە ڕاستیدا HTML ، نەک . لاپەڕەیەک وەسف دەکات، بەڵام ناتوانێت بڕیار بدات.

Dilan

Oh, I see. So which language should I learn first?

ئا، تێگەیشتم. کەواتە سەرەتا فێری کام زمان ببم؟

Aram

I started with Python. It's a high-level language, so it's easy to read. Look at this line: if score > 50: print('Pass').

من بە Python دەستم پێکرد. ، بۆیە خوێندنەوەی ئاسانە. سەیری ئەم دێڕە بکە: if score > 50: print('Pass').

Dilan

That's almost English! What happens when you run it?

ئەوە نزیکەی ئینگلیزییە! کاتێک کاری پێ دەکەیت چی ڕوو دەدات؟

Aram

The Python interpreter translates it and runs it step by step. In C, you have to compile the whole program first.

Python وەریدەگێڕێت و هەنگاو بە هەنگاو جێبەجێی دەکات. لە Cـدا دەبێت سەرەتا هەموو وەربگێڕیت.

Dilan

And have you ever had a bug?

ئەی تا ئێستا تووشی بوویت؟

Aram

Hundreds! Last week my program ran without any error messages, but the answer was wrong. It was a logic error.

سەدان جار! هەفتەی ڕابردوو بەبێ هیچ کاری کرد، بەڵام وەڵامەکە هەڵە بوو. بوو.

Dilan

How did you find it?

چۆن دۆزیتەوە؟

Aram

I did a dry run. I followed the code line by line with a pen and paper, and I found that I'd written “greater than” instead of “greater than or equal to”.

جێبەجێکردنێکی دەستیم کرد. بە قەڵەم و کاغەز دێڕ بە دێڕ بەدوای کۆدەکەدا چووم و بۆم دەرکەوت کە لە جیاتی «گەورەتر یان یەکسان» نووسیبووم «گەورەتر».

Dilan

Great tip. Can I join the club?

ئامۆژگارییەکی باشە. دەتوانم بەشداری یانەکە بکەم؟

Aram

Of course! First, write an algorithm for something simple, like making tea. Then we'll turn it into code together.

بێگومان! سەرەتا بۆ شتێکی سادە بنووسە، وەک دروستکردنی چا. پاشان پێکەوە دەیکەین بە کۆد.

Quick checkپشکنینی خێراWhy isn't HTML a programming language, according to Aram?بە ڕای ئارام، بۆچی HTML نییە؟

ExerciseڕاهێنانSpeaking: your computer storyقسەکردن: چیرۆکی تۆ و کۆمپیوتەر

Interview a partner with the present perfect: Have you ever written a program? made a website? fixed a bug? used an IDE? When the answer is yes, ask a follow-up question in the past simple: What did it do? Which language did you use? How long did it take?

بە چاوپێکەوتن لەگەڵ هاوڕێیەکت بکە: Have you ever written a program? made a website? fixed a bug? used an IDE? کاتێک وەڵامەکە yes بوو، پرسیارێکی تر بە بکە: What did it do? Which language did you use? How long did it take?

Hintئاماژە

Notice the -ed sounds: used /d/, fixed /t/, created /ɪd/.

سەرنجی دەنگی -ed بدە: used /d/، fixed /t/، created /ɪd/.

Going further: precise programming English

  • code is uncountable in programming: a lot of code, a line of code, a piece of code, never codes. A code is a secret number: a 2FA code, a discount code.
  • run / execute / launch: run is everyday (run the program), execute is formal (the statement is executed), launch means start an app.
  • Comparing: whereas, while and unlike show contrast. A compiler translates the whole program, whereas an interpreter translates it statement by statement. Unlike C, PHP does not produce an .exe file.
  • Purpose: to + verb or in order to + verb, never for to: We use a flowchart to show the decisions.
  • The real picture is mixed. Many languages use both methods: Java and Python first compile source code to bytecode, and then a virtual machine or interpreter runs it. PHP compiles each script to opcodes in memory before running them.
  • Topic sentences: a good technical paragraph starts with one sentence that gives the main idea (There are two kinds of translator.). The next sentences give the major details, then the minor details and examples.
  • Object-oriented programming (OOP): languages such as Java, C#, Python and PHP organise a program into objects made from classes (for example a Student class, and the object Shilan with her own name and marks). See Building software.
A short history: past simple and past passive
YearEvent
1957FORTRAN, one of the first high-level languages, was released by IBM.
1959COBOL was designed for business programs.
1972Dennis Ritchie created the C language at Bell Labs.
1991Guido van Rossum released the first version of Python.
1995Java, JavaScript and PHP all appeared in the same year.
Early FORTRAN programs were written on punched cards, one card for each statement. (This card is from around 1970.)بەرنامەکانی سەرەتای FORTRAN لەسەر کارتی کونکراو دەنووسران، بۆ هەر کارتێک. (ئەم کارتە نزیکەی ساڵی ⁦1970⁩ـە.)Arnold Reinhold, via Wikimedia Commons · CC BY-SA 2.5

Say the -ed endings correctly: released /t/, designed /d/, created /ɪd/, appeared /d/, developed /t/. After /t/ or /d/ the ending is a full extra syllable /ɪd/.

ExerciseڕاهێنانExtension: pseudocode for an average

Write pseudocode for an algorithm that inputs five marks and outputs their average. Use a FOR loop and a running total. Then describe it in three sentences.

Show answerوەڵامەکە پیشان بدە
TEXT
total ← 0
FOR count ← 1 TO 5
    INPUT mark
    total ← total + mark
NEXT count
average ← total / 5
OUTPUT average

First, the algorithm sets the total to zero. Then it repeats two steps five times: it inputs a mark and adds it to the total. Finally, it divides the total by five and outputs the average.

هەڵە باوەکانی کوردزمانان

هەڵە ← ڕاست
هەڵەڕاستڕوونکردنەوە
I wrote many codes.I wrote a lot of code.لە code : a lot of code، a line of code.
If the mark will be 50, …If the mark is 50, …دوای if دێت، نەک will.
If is correct, shows “Welcome”.If it is correct, it shows “Welcome”.ئینگلیزی بکەری پێویستە: it.
We use a compiler for translate the code.We use a compiler to translate the code.بۆ مەبەست to + کار، نەک for.
The mark is greater from 50.The mark is greater than 50.بە کوردی «لە ٥٠ گەورەتر»، بەڵام لە ئینگلیزیدا than، نەک from.
language high-level, code sourcehigh-level language, source codeئاوەڵناو و ناوی یاریدەدەر پێش ناوی سەرەکی دێن، پێچەوانەی ئیزافەی کوردی ().
The program is compile.The program is compiled. / The compiler compiles the program. پێویستی بە هەیە: compiled.
I did a program.I wrote (made, developed) a program.لە ئینگلیزیدا write دەکرێت؛ do لەگەڵیدا نایەت.
Exerciseڕاهێنانوەرگێڕان: کوردی ← ئینگلیزی

ئەم ڕستانە وەربگێڕە سەر ئینگلیزی:

  1. سەرەتا بنووسە، پاشان کۆدەکە.
  2. هەموو پێش کارکردن وەردەگێڕێت.
  3. ئەگەر نمرەکە لە ٥٠ کەمتر بێت، دەنووسێت «Fail».
  4. ئەم هەنگاوانە دووبارە دەکاتەوە تا PINـی دروست دەنووسێت.
  5. لە کۆدەکەمدا هەبوو.
Show answerوەڵامەکە پیشان بدە
  1. First write an algorithm, then the code.
  2. A compiler translates the whole program before it runs.
  3. If the mark is less than 50, the program prints “Fail”.
  4. The program repeats these steps until the user types the correct PIN.
  5. There was a logic error in my code.

هەڵە باوەکانی کوردزمانان

گۆکردن

  • algorithm /ˈælɡərɪðəm/: فشار لەسەر بڕگەی یەکەمە و th دەنگی /ð/ـە (زمان لە نێوان ددانەکاندا)، نەک «ت» یان «س».
  • pseudocode /ˈsjuːdəʊkəʊd/: پیتی p بێدەنگە: «سیوودۆکۆد».
  • machine /məˈʃiːn/: ch وەک «ش» دەخوێندرێتەوە و فشار لەسەر بڕگەی دووەمە.
  • compiler /kəmˈpaɪlə/، interpreter /ɪnˈtɜːprɪtə/، debug /diːˈbʌɡ/: فشار لەسەر بڕگەی دووەمە.
  • کۆتایی -ed: compiled /d/، stopped /t/، executed /ɪd/. تەنها دوای t و d بڕگەیەکی زیادە دەخوێندرێتەوە.

هەڵە باوەکانی کوردزمانان

مێژوویەکی کورت: ڕابردووی سادە و بکەرنادیار

مێژوویەکی کورت: و
ساڵئینگلیزیکوردی
1957FORTRAN was released by IBM.FORTRAN لەلایەن IBMـەوە بڵاو کرایەوە، یەکێک لە یەکەمین .
1972Dennis Ritchie created the C language.دێنیس ڕیچی زمانی Cـی دروست کرد.
1991Python was first released.یەکەم وەشانی Python بڵاو کرایەوە.
1995Java, JavaScript and PHP appeared.Java، JavaScript و PHP لە هەمان ساڵدا دەرکەوتن.

Reviewپێداچوونەوە

Review questionsپرسیارەکانی پێداچوونەوە
What is the difference between pseudocode and a flowchart?جیاوازیی نێوان نیمچەکۆد و هێڵکاریی ڕەوت چییە؟

Both describe an algorithm. Pseudocode uses short English-like lines; a flowchart uses shapes and arrows.

هەردووکیان وەسف دەکەن. دێڕی کورتی وەک ئینگلیزی بەکاردەهێنێت؛ شێوە و تیر بەکاردەهێنێت.

Why do we need compilers and interpreters?بۆچی پێویستمان بە کۆمپایلەر و ئینتەرپرێتەر هەیە؟

Because people write in high-level languages, but the CPU only understands machine code. Compilers and interpreters translate between them.

چونکە خەڵک بە دەنووسن، بەڵام تەنها تێدەگات. و لە نێوانیاندا وەردەگێڕن.

Read this aloud: if ($age >= 18)ئەمە بە دەنگی بەرز بخوێنەوە: if ($age >= 18)

“If age is greater than or equal to eighteen…”

If age is greater than or equal to eighteen…

Which flowchart symbol is used for a decision?کام هێمای هێڵکاریی ڕەوت بۆ بڕیار بەکاردێت؟

A diamond. It has two ways out: yes and no.

چوارگۆشەی لار. دوو ڕێگای دەرچوونی هەیە: بەڵێ و نەخێر.

Quick checkپشکنینی خێراA program shows “Parse error: syntax error, unexpected end of file on line 7” and does not run. What is it? دەڵێت Parse error: syntax error, unexpected end of file on line 7 و کار ناکات. ئەمە چییە؟

Quick checkپشکنینی خێراChoose the correct word: “A good ___ always tests her code.”وشە دروستەکە هەڵبژێرە: A good ___ always tests her code.

Videoڤیدیۆ

Watch a videoسەیری ڤیدیۆیەک بکە

A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.

What's an algorithm? - David J. MalanTED-Ed · Englishئینگلیزی · 2.8M viewsبینین · 47K likesلایک

Learn what an algorithm is with an everyday counting example, how a loop repeats steps, and how to write the steps as pseudocode.

بە نموونەیەکی ڕۆژانەی ژماردن فێردەبیت چییە، چۆن هەنگاوەکان دووبارە دەکاتەوە و چۆن هەنگاوەکان وەک بنووسیت.

Whole video: what an algorithm is, with a loop and pseudocode.

هەموو ڤیدیۆکە: چییە، لەگەڵ و .

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

Building Softwareدروستکردنی نەرمەواڵە

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.