Programming languagesprogramming languagesProgramming languages differ from languages we use every day in that they are more precise and unambiguous; it can be said that they are more formalised. A programming language comprises an appropriate set of instructions, keywordskeywordskeywords and the rules of syntaxsyntaxsyntax. The syntax of a programming language is a set of rules that the written codecodecode must follow in order to be recognised as a programmeprogrammeprogramme. Syntax includes available symbols, mathematical and logical operators and keywords, which can be used while writing a programme. Keywords usually come from the English language and are used as commands, instructions or declarations, e.g. BEGIN, END, FUNCTION, IF, DO, STOP, CONTINUE, GO, PRINT. Instructions describe operations such as: inserting or displaying data, performing calculations, specifying conditions or the number of iterations. You must be careful when you write a computer programme since it will not run if it has even the slightest error or a missing coma or semicolon.
Some programming languages are created from scratch, however most of them evolve from already known solutions. Many keywordskeywordskeywords and rules of syntaxsyntaxsyntax are the same in various programming languages. Therefore learning one programming language enables mastering another one quicker.
R1UohjUpKgVNj
ilustracja przedstawia rozsypankę wyrazową składającą się z nazw języków programowania. Słowa pisane są różną wielkością czcionek, jedne można z łatwością odczytać, inne są tak małe, że praktycznie niewidoczne. Wymienione języki programowania to: C, C++, Pearl, Algol, Assembly, Pascal, Python, Ruby, Java, JavaScript, Lisp, VP, Prolog.
A computer programmeprogrammeprogramme is an interpretation of a algorithm written in a selected programming language. An algorithm is a step‑by‑step instructioninstructioninstruction on how to solve a problem or perform a task. The examples of algorithms are a recipe for a cake or describing the way from home to the cinema. In computer science, an algorithm is a set of steps to be performed by a computer programme in order to complete a task.
Rnc0MbqLdHnt9
Ilustracja przedstawia kod programu komputerowego zajmujące całą przestrzeń. Za ciągami liter kryje się twarz dziecka. Na pierwszym planie widoczny napis a computer programme = syntax rules + keywords.
Ada Lovelace, the daughter of the poet Lord Byron, wrote the first ever algorithm in 1843. She completed the work of Charles Babbage on an analytical machine with her own description of an algorithm intended to be carried out by such a machine. The algorithm generated the consecutive Bernoulli numbers. Only in 1991, a working specimen of the machine was constructed using materials that would have been available in Lovelace’s days.
There are many classifications of programming languagesprogramming languagesprogramming languages, depending on a specified criterion.
Classification by the method of code processing
CompiledcompiledCompiled languages – the source codecodecode is translated into the machine language, which is understandable for the processor – C++, Pascal.
InterpretedinterpretedInterpreted languages – the source code is directly translated and executed by a programmeprogrammeprogramme called an interpreter – Perl, JavaScript.
Mixed languages – i.e. compiled to bytecode and interpreted by a virtual machine – Java.
Classification by a programming paradigm (pattern)
Non‑structurednon‑structuredNon‑structured languages – Basic.
Structured languages (programmes are made up of smaller elements, procedures, functions etc.) – Pascal, C.
Object‑orientedobject‑orientedObject‑oriented languages (programmes are made up of objects, which have their properties and perform operations) – C++, Java.
On the Internet, find another examples of structuredstructuredstructured and object‑orientedobject‑orientedobject‑oriented languages.
RJo5DGO6SBC2U
Ilustracja interaktywna przedstawia piramidę przedstawiającą podział języków programowania. Piramida podzielona jest na 5 części, które zostały oznaczone numerami od 1 do 5. Od góry na pierwszym segmencie oznaczonym numerem 1 znajduje się napis 10011100110. Na drugim segmencie oznaczonym numerem 2 znajduje się napis: MOV CX, 12. Na trzecim segmencie oznaczonym numerem 3 znajduje się napis: x=5+sin(b). Na czwartym segmencie oznaczonym numerem 4 znajduje się napis: select max (d) from project where type='internal'. Na piątym segmencie oznaczonym numerem 5 znajduje się napis: 'if temperature is high, then switch the power off. Pomiędzy drugim a trzecim segmentem znajduje się linia przerywana. Powyżej linii napis: Low-level programming languages, natomiast poniżej napis: High-level programming languages. Na numerach widoczne są podpisy. 1. Machine languages – a programme is represented in binary digits: 0 and 1. {audio}, 2. Assemblers – programmes in which one instruction corresponds basically to one command of the processor. {audio}, 3. High-level programming languages, structured languages, e.g. Pascal, C, FORTRAN, and object-oriented languages, e.g. C++, Java. {audio}, 4. Very high-level programming languages, e.g. SQL. {audio}, 5. Artificial intelligence languages, similar to natural languages, e.g. PROLOG. {audio}.
Ilustracja interaktywna przedstawia piramidę przedstawiającą podział języków programowania. Piramida podzielona jest na 5 części, które zostały oznaczone numerami od 1 do 5. Od góry na pierwszym segmencie oznaczonym numerem 1 znajduje się napis 10011100110. Na drugim segmencie oznaczonym numerem 2 znajduje się napis: MOV CX, 12. Na trzecim segmencie oznaczonym numerem 3 znajduje się napis: x=5+sin(b). Na czwartym segmencie oznaczonym numerem 4 znajduje się napis: select max (d) from project where type='internal'. Na piątym segmencie oznaczonym numerem 5 znajduje się napis: 'if temperature is high, then switch the power off. Pomiędzy drugim a trzecim segmentem znajduje się linia przerywana. Powyżej linii napis: Low-level programming languages, natomiast poniżej napis: High-level programming languages. Na numerach widoczne są podpisy. 1. Machine languages – a programme is represented in binary digits: 0 and 1. {audio}, 2. Assemblers – programmes in which one instruction corresponds basically to one command of the processor. {audio}, 3. High-level programming languages, structured languages, e.g. Pascal, C, FORTRAN, and object-oriented languages, e.g. C++, Java. {audio}, 4. Very high-level programming languages, e.g. SQL. {audio}, 5. Artificial intelligence languages, similar to natural languages, e.g. PROLOG. {audio}.
Learning one programming language enables mastering another one quicker.
Exercises
R1eBXueUGwpez
Exercise 1
Wersja alternatywna ćwiczenia: Determine which sentences are true. Możliwe odpowiedzi: 1. A programming language comprises an appropriate set of instructions, keywords and the rules of syntax. , 2. A computer programme is an interpretation of an algorithm written in a selected programming language., 3. An algorithm is a set of steps to be performed by a computer programme in order to complete a task., 4. There is only one classification of programming languages. , 5. The first computer programme was written in the 20th century.
Wersja alternatywna ćwiczenia: Determine which sentences are true. Możliwe odpowiedzi: 1. A programming language comprises an appropriate set of instructions, keywords and the rules of syntax. , 2. A computer programme is an interpretation of an algorithm written in a selected programming language., 3. An algorithm is a set of steps to be performed by a computer programme in order to complete a task., 4. There is only one classification of programming languages. , 5. The first computer programme was written in the 20th century.
Determine which sentences are true.
A programming language comprises an appropriate set of instructions, keywords and the rules of syntax.
A computer programme is an interpretation of an algorithm written in a selected programming language.
An algorithm is a set of steps to be performed by a computer programme in order to complete a task.
There is only one classification of programming languages.
The first computer programme was written in the 20th century.
zadanie
Source: GroMar, licencja: CC BY 3.0.
Exercise 2
On the Internet, find programming languages that can be used to:
creating web sites and applications,
performing mathematical calculations,
creating computer games,
creating computer applications,
creating mobile applications,
programming artificial intelligence.
Look at the effect of your work. Are programming languages dedicated only to one application or are they universal?
Exercise 3
Consider which programming language you would like to learn. Why? Explain in English.
ROj0MWLz2dHjD
Exercise 4
Wersja alternatywna ćwiczenia: Indicate which pairs of expressions or words are translated correctly. Możliwe odpowiedzi: 1. języki programowania - programming languages, 2. składnia - syntax, 3. słowa kluczowe - keywords, 4. obiektowe - object-oriented, 5. kod - instruction, 6. kompilowane - structured
Wersja alternatywna ćwiczenia: Indicate which pairs of expressions or words are translated correctly. Możliwe odpowiedzi: 1. języki programowania - programming languages, 2. składnia - syntax, 3. słowa kluczowe - keywords, 4. obiektowe - object-oriented, 5. kod - instruction, 6. kompilowane - structured
Indicate which pairs of expressions or words are translated correctly.
języki programowania - programming languages
składnia - syntax
słowa kluczowe - keywords
obiektowe - object-oriented
kod - instruction
kompilowane - structured
zadanie
Source: GroMar, licencja: CC BY 3.0.
R18piHXZuGKYn1
Interaktywna gra, polegająca na łączeniu wyrazów w pary w ciągu jednej minuty. Czas zaczyna upływać wraz z rozpoczęciem gry. Jeden ruch to odkrywanie najpierw jednej potem drugiej karty z wyrazem. Każdy wyraz jest odczytywany. Kolejny ruch to odkrywanie trzeciej i czwartej karty. W ten sposób odsłuchasz wszystkie wyrazy. Nawigacja z poziomu klawiatury za pomocą strzałek, odsłuchiwanie wyrazów enterem lub spacją. Znajdź wszystkie pary wyrazów.
Interaktywna gra, polegająca na łączeniu wyrazów w pary w ciągu jednej minuty. Czas zaczyna upływać wraz z rozpoczęciem gry. Jeden ruch to odkrywanie najpierw jednej potem drugiej karty z wyrazem. Każdy wyraz jest odczytywany. Kolejny ruch to odkrywanie trzeciej i czwartej karty. W ten sposób odsłuchasz wszystkie wyrazy. Nawigacja z poziomu klawiatury za pomocą strzałek, odsłuchiwanie wyrazów enterem lub spacją. Znajdź wszystkie pary wyrazów.
Match Polish terms with their English equivalents.
języki programowania
kompilowane
słowa kluczowe
składnia
programming languages
syntax
keywords
compiled
instrukcja
instruction
Source: Zespół autorski Politechniki Łódzkiej, licencja: CC BY 3.0.