Wróć do informacji o e-podręczniku Wydrukuj Pobierz materiał do PDF Pobierz materiał do EPUB Pobierz materiał do MOBI Zaloguj się, aby dodać do ulubionych Zaloguj się, aby skopiować i edytować materiał Zaloguj się, aby udostępnić materiał Zaloguj się, aby dodać całą stronę do teczki
RFNXVfwQQPS4J

The Tower of Babel in computer science

Source: licencja: CC 0.

Informatyczna Wieża Babel

You will learn
  • what a programming language is,

  • what a computer programme is,

  • the difference between a program and an algorithm,

  • the classification of programming languages and differences between them.

RShueoufSCwoe
nagranie abstraktu

What is a programming language?

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
Programming languages
Source: GroMar, licencja: CC BY 3.0.
RlWheaKCXv0Hn
nagranie abstraktu

What is a computer programme?

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
Computer programme
Source: GroMar, licencja: CC BY 3.0.
R1QVfUGLswrVy
nagranie abstraktu

Who wrote the first programme?

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.

R1dAWC1qSt6Bn
nagranie abstraktu

There are many classifications of programming languagesprogramming languagesprogramming languages, depending on a specified criterion.

Classification by the method of code processing

  1. CompiledcompiledCompiled languages – the source codecodecode is translated into the machine language, which is understandable for the processor – C++, Pascal.

  2. InterpretedinterpretedInterpreted languages – the source code is directly translated and executed by a programmeprogrammeprogramme called an interpreter – Perl, JavaScript.

  3. Mixed languages – i.e. compiled to bytecode and interpreted by a virtual machine – Java.

Task 1
R18w7yl4bW0iT1
nagranie abstraktu

On the Internet, find another examples of compiled and interpretedinterpretedinterpreted languages.

R1Xgbm9fJHAt9
nagranie abstraktu

Classification by a programming paradigm (pattern)

  1. Non‑structurednon‑structuredNon‑structured languages – Basic.

  2. Structured languages (programmes are made up of smaller elements, procedures, functions etc.) – Pascal, C.

  3. Object‑orientedobject‑orientedObject‑oriented languages (programmes are made up of objects, which have their properties and perform operations) – C++, Java.

Task 2
RRxk92wmVzCzC1
nagranie abstraktu

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}.
Generations of programming languages
Source: GroMar, licencja: CC BY 3.0.
Task 3
RyFoei6Cvkljk1
nagranie abstraktu

On the Internet, find the examples of programming languages presented in the interactive illustration.

Re8I0naN2hVlQ1
nagranie abstraktu

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.
zadanie
Source: GroMar, licencja: CC BY 3.0.
Exercise 2

On the Internet, find programming languages that can be used to:

  1. creating web sites and applications,

  2. performing mathematical calculations,

  3. creating computer games,

  4. creating computer applications,

  5. creating mobile applications,

  6. 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
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.
Source: Zespół autorski Politechniki Łódzkiej, licencja: CC BY 3.0.

Glossary

code
code

kod

R1JorZ2D5ClUr1
wymowa w języku angielskim: code
compiled
compiled

kompilowane

R80uJrS1jW2df1
wymowa w języku angielskim: compiled
high‑level programming languages
high‑level programming languages

języki wysokiego poziomu

RRSkeQp3k5WJV1
wymowa w języku angielskim: high‑level programming languages
instruction
instruction

instrukcja

RyCCuvEkuAYh81
wymowa w języku angielskim: instruction
interpreted
interpreted

interpretowane

RT2dbStz17HE61
wymowa w języku angielskim: interpreted
keywords
keywords

słowa kluczowe

R1M3J8C7Evmt01
wymowa w języku angielskim: keywords
low‑level programming languages
low‑level programming languages

języki niskiego poziomu

RW3u7u41LV6m61
wymowa w języku angielskim: low‑level programming languages
non‑structured
non‑structured

niestrukturalne

RJ6Ss7g3vGJWo1
wymowa w języku angielskim: non‑structured
object‑oriented
object‑oriented

obiektowe

R1SX433cvoaS61
wymowa w języku angielskim: object‑oriented
programme
programme

program

RptFoXwIi0gDw1
wymowa w języku angielskim: programme
programming languages
programming languages

języki programowania

RlNLEp0Kcz8Qn1
wymowa w języku angielskim: programming languages
structured
structured

strukturalne

R1S3pxbfFRL5a1
wymowa w języku angielskim: structured
syntax
syntax

składnia

R1PHiqEA2Vnak1
wymowa w języku angielskim: syntax

Keywords

instructioninstructioninstruction

keywordskeywordskeywords

programming languagesprogramming languagesprogramming languages

syntaxsyntaxsyntax