# Some definitions

Computer Science: Computer science is the scientific and practical approach to computation and its applications.

Algorithm: An algorithm is a step-by-step procedure for solving a problem (calculations).

Programming language: A programming language is a formal language (defined by a formal grammar) designed to write programs to be executed by a computer.

Grammar: A grammar or formal grammar is a set of production rules for strings in a formal language. The rules describe how to form strings from the language’s alphabet that are valid according to the language’s syntax. A grammar does not describe the meaning of the strings or what can be done with them in whatever context—only their form.  A grammar G is formally defined as a tuple $(N, \Sigma, P, S)$  where

• N is a finite set of nonterminal symbols, that is disjoint with the strings formed from G.
• $\Sigma$  is a finite set of terminal symbols that is disjoint from N.
• P is a finite set of production rules, each rule of the form $(\Sigma \cup N)^{*} N (\Sigma \cup N)^{*} \rightarrow (\Sigma \cup N)^{*}$
• $S \in N$  is a distinguished symbol that is the start symbol, also called the sentence symbol.

Program: A program is a list (sequence) of instructions written in a formal language that specifies how to perform a computation.

Computer: A computer is a general purpose device that can be programmed to perform computations (arithmetic and logic) automatically.

Programming paradigm: A programming paradigm is a fundamental style of computer programming, a way of building the structure and elements of computer programs. Examples are – imperative, declarative, functional, object-oriented, logic, and symbolic programming.

Imperative Programming: Imperative programming is a programming paradigm that describes computation in terms of statements that change a program state, i.e., a sequence of instructions to perform the computation (the how). In much the same way that imperative mood in natural languages expresses commands to take action, imperative programs define sequences of commands for the computer to perform.

Procedural Programming: Procedural programming is imperative programming in which the program is built from one or more procedures (also known as subroutines or functions).

Modular Programming:  Modular programming is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect of the desired functionality.

Structured Programming: Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making extensive use of subroutines, block structures and for and while loops – in contrast to using simple tests and jumps such as the goto statement which could lead to spaghetti code which is difficult both to follow and to maintain. It basically means using explicit control-flow structures rather than jumping about directly from instruction to instruction.

Functional Programming: Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids changing state and mutable data. It treats functions as values and deals with the what in contrast to imperative programming which deals with the how. See for further details – Functional Programming vs Procedural Programming.