Define basic programming language code#
On the other hand, low-level languages usually convert the whole source code to machine code before running, because the source code is so close to the hardware that it is easy to do so.ĭeclarative vs. Many high-level languages require an interpreter to run the source code on the hardware in real time. This is because high-level programming languages abstract away the hardware the program is running on. High-level programming languages require less knowledge about the hardware compared to low-level programming languages. The examples of each type are given in each section below because they are the best well-known examples of that type. Most programming languages do not follow one type alone, so it is difficult to assign a type for each language. There are many types of programming languages. A very small mistake can cause a very big problem. When a program has a problem because of how the code was written, this is called a " bug". If a programmer makes mistakes, or a program tries to do something the programmer did not design it to do, then the program might then stop working, which is called "crashing". Many programs are then compiled, which means that the computer changes, or translates, the source code into another language (such as assembly language or machine language) that a computer can read, but which is much harder for a person to read.Ĭomputer programs must be written very carefully. Like any normal language, many programming languages use punctuation. else.", "and", "or"), so that the language is easier for a human to understand. Usually, the programming language uses real words for some of the commands (e.g. A programming language is like a set of instructions that the computer follows to do something.Ī programmer writes text in the source code of a programming language to make programs. Programming languages are used to write all computer programs and computer software. Examples are: Python, Ruby, Java, JavaScript, C, C++, and C#. Imperative programmingĪ programming language is a type of written language that tells computers what to do.