AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Contents · Computing

Programs and programming languages

Lessons 19–20 · 2 lessons · M. R. Fayziyeva, D. M. Sayfurov, N. S. Xaytullayeva. Informatics and Information Technologies, Grade 9. “Nashriyot uyi Tasvir”, Tashkent, 2020
20

Programming languages

Textbook: pp. 48–51
GoalLists the main programming languages and where they are used, tells a compiler from an interpreter and an IDE, and knows the six stages of creating a program.
New words
programming language: a formal language with strict rules for writing programs · dasturlash tilicompiler: translates the whole program into machine code before it is run · kompilyatorinterpreter: translates and carries out the program step by step and reports an error at once · interpretatorIDE (integrated development environment): a program with an editor, translator and debugging tools for writing code · IDE
Explanation

The processor does not directly understand text in a programming language; it carries out only machine code (0s and 1s). So a translator is needed. A compiler reads the whole program, translates it into machine code and produces an executable file. An interpreter translates the program line by line while carrying it out and reports an error as soon as it meets one. Popular languages: C – for operating systems and system programs; Java – for computer and Android phone applications (today Kotlin is also widely used for Android apps, and Swift for iPhone apps); JavaScript – for making web pages interactive; PHP – for the server side of dynamic websites; Scratch – a visual language for learning; Python – for many kinds of tasks, data analysis and artificial intelligence. An IDE is a program that joins a text editor, a translator and tools for finding errors. The six stages of creating a program: finding the requirements, design, writing the code, finding errors and testing, putting it into use, and support.

LanguageUse
Coperating systems, system programs
Javacomputer and Android applications
JavaScriptmaking web pages interactive
PHPserver side of dynamic websites
Scratchvisual language for learning
Pythonmany tasks, data analysis, artificial intelligence
💡 Where will I use this?
In real life

A pupil wanted to make a small quiz game for the class and asked the computer teacher which language to use. The teacher first asked what the game should do, where it would run and who would use it, and only then suggested a language.

Who uses it

Programmers, system analysts and student learners choose a handy language for the task.

Try it today

Before choosing any tool, write the requirements of a small program you would like in three lines: what it does, who uses it and where it runs. Do not write any code.

Worked examples
To write an app for an Android phone, Java or Kotlin fits; for a colour change when a button is clicked on a web page – JavaScript; for teaching children to build programs from blocks – Scratch; for both learning and data analysis – Python.
Interpreter: line 1 ran fine, line 2 has an error – the program stops there and reports it. Compiler: it first checks the whole program; if there is an error, no executable file is made and a list of errors is given.
Class activity

“Choosing a language”: cards show tasks (web animation, game engine, a teaching program for children, artificial intelligence); groups choose the matching language and give a reason.

Practice
1
State the main difference between a compiler and an interpreter.
2
Which language would you choose: a) a phone app; b) making a web page interactive; c) teaching children visual programming?
3
Write the stages of creating a program in order: testing, writing code, putting into use, finding requirements, support, design.
4
Why is an interpreter convenient for beginners?
Story of the Week · The Khwarizmi WayThe winter production planClose the week: all of this week’s subjects in one storyRead →