Fairly close. A programming language is a means of communicating with the machine, instructing it to perform a specific sequence of statements. Depending on the language, those statements may be low-level (like assembly) or high-level (like Java). The level determines the amount of abstraction between the language and the machine. Higher-level languages are easier to program than low-level languages, but low-level languages are generally more efficient.
An algorithm is a procedure or formula for solving a problem; a finite series of computation steps to produce a result. A programming language is not an algorithm. It simply provides the means of translating an algorithm into machine-dependant instructions. Algorithms are typically written using pseudo-code, a non-existent, generalised programming language that can be easily translated into a more specific programming language.
Many programming languages incorporate algorithms as part of the language. For instance, the C++ standard template library provides many algorithms in the form of function templates that can accommodate a wide variety of sequence containers (class templates), such as arrays, lists, sets and maps, or any user-defined container that follows the standard. For example, the std::sort algorithm is a function template that can be used to sort a sequence container, regardless of it type and regardless of the type of data it contains. Although these algorithms are generic in nature, they are highly optimised such that they do not sacrifice performance for generality. You don't have to use them -- you can easily write your own algorithms to perform the same tasks -- but it makes no sense to re-invent wheels unnecessarily, especially for an "everyday" algorithm like sorting or accumulation.
Programs are themselves an algorithm, albeit a highly-complex one composed of many individual algorithms. Thus we can think of a programming language as being the means of implementing simple algorithms in order to solve complex problems.
Algorithms can be described in any programming or natural language, or with special devices like flow-charts.
Algol
CODING Implementation
Translating an algorithm into a programming language is called coding. A variable declaration tells the operating system to allocate storage space in RAM.
Writing code is the process of implementing an algorithm in a specific programming language.
Pseudo-code allows for an intermediate step between a human language description of an algorithm and a programming language description of the algorithm. It is often a good way for non-programmers to understand the programming process.
Pseudocode. However, pseudocode is not a programming language as such. It is a language that a programmer uses specifically to convey the concept of a specific algorithm to other programmers. The language is such that any programmer can easily translate the algorithm into their preferred language. Furthermore, pseudocode does not have to be written in English, it can be written in any language. However, English is the most widely-spoken language within the programming community and is therefore the most prevalent language used in programming.
CODING Implementation
Translating an algorithm into a programming language is called coding. A variable declaration tells the operating system to allocate storage space in RAM.
Pseudo-code allows for an intermediate step between a human language description of an algorithm and a programming language description of the algorithm. It is often a good way for non-programmers to understand the programming process.
Writing code is the process of implementing an algorithm in a specific programming language.
programming language
programming language
Pseudocode. However, pseudocode is not a programming language as such. It is a language that a programmer uses specifically to convey the concept of a specific algorithm to other programmers. The language is such that any programmer can easily translate the algorithm into their preferred language. Furthermore, pseudocode does not have to be written in English, it can be written in any language. However, English is the most widely-spoken language within the programming community and is therefore the most prevalent language used in programming.
This is the definition of an algorithm - a list of orders of how to solve a given programming problem.
Algorithms are language independent. An algorithm is a procedure or formula for solving a problem: a finite series of computation steps to produce a result. Algorithms make no assumptions about programming languages or technologies; they are generally written in plain English. Pseudocode is typically used to demonstrate the implementation of an algorithm using a combination of plain English and program-like constructs such as loops and variables. Programmers can easily convert the pseudocode to a specific programming language.
Advantages of an Algorithm: Effective Communication: Since the algorithm is written in English like language, it is simple to understand the step-by-step solutions of the problems. Easy Debugging: Well-designed algorithm makes debugging easy so that we can identify a logical error in the program. Easy and Efficient Coding: An algorithm acts as a blueprint of a program and helps during program development. Independent of Programming Language: An algorithm is independent of programming languages and can be easily coded using any high-level language. Disadvantages of an Algorithm: Developing algorithms for complex problems would be time-consuming and difficult to understand. Understanding complex logic through algorithms can be very difficult.
There is no specific Hard and Fast rule for writing algorithm. The normal method is the following: 1. get a problem 2. find or invent an algorithm to solve it 3. implement the algorithm in a programming language (C, for example)
You have to take some decisions. In a programming language, that might be done with an "if" statement.