Menu Bar

Horizontal Scrollable Menu

ads

Search This Blog

what is python,program,debugging | Formal and Natural Languages | Glossary -page 1


The Way Of The Program

1.1  Introduction.

1.2  The Python Programming Language.1.3  What is a program?1.4  What  is Debugging?1.5  Formal and Natural Languages.
1.6  The first program.
1.7   Glossary.



Introduction:

Python is widely used general purpose, High level programming language. It was initially designed by Guido Van Rossum in 1991 and developed by python software foundation. It was mainly developed for emphasis on code readability and its syntax allows programmable to express concepts in fewer lines of code.
python

The Way Of The Program:


The single most important skill for a programmer is problem solving. Problem solving means the ability to formulate problems, think creatively about solutions, and express a solution clearly and accurately. As it turns out, the process of learning to program is an excellent opportunity to practice problem-solving skills.

The python programming language:


The programming languages are two types, high-level and Low-level languages. High level languages are designed to be used by the human operator or the programmer. They are referred to as “close to humans “. In other words, their programming style and context is easier to learn and implement than low level languages, and entire code generally focuses on the specific program to be created. High level languages are python, c, c++, perl and java. Low level languages are machine language and assembly language.

Two kinds of program process high level languages into low level languages: Interpreters and compilers. An interpreters reads a high level language and executes a code line by line where as complier executes the code after compiling the whole code. Python comes under the interpreter because of it executes every line and it shows error in any particular line.

What is a Program:


A program is a sequence of instructions that specifies how to perform a computation. The computation might be something Mathematical, such as solving a system of equations or finding the roots of a polynomial, but it can also be a symbolic computation, such as searching and replacing text in a document or complaining a program.

If you want some specific work from a specific device, then you gave some lines of code according to your needs. That is called PROGRAM.


What is debugging:

Programming is a complex process, and because it is done by human beings, it often leads to errors. For whimsical reasons, programming errors are called Bugs. The process of tracking them down and correcting them is called DEBUGGING.
Three kinds of errors can occur in a program: SYNTAX errors, RUNTIME errors and
SEMANTIC errors. It is useful to distinguish between them in order to track them down more quickly.

Syntax errors:


Syntax errors are the most basic type of error. They arise when the python parser is unable to understand a line of code. Then it shows the syntax error on a particular line and the exact word also with this symbol ^”. This errors happens when python can’t understand what your are saying.

Runtime Errors:


It doesn’t show any error until you run the program, it don’t have any syntax error. But while executing the program it shows the error, this error is called the Runtime error or Exceptions.
Semantic error:

The third type of error is semantic error. The program won’t shows any error while running and executing. Its shows the wrong output because of the small errors in the program like dividing by 0, end of the line: will be missed like that. to identify this errors you what to do reverse programming.

Formal and Natural languages:


Natural Languages are the languages that people speak, such as English, Spanish, and French.

Formal Languages are languages that are designed by people for specific applications. For example, the notation that mathematicians use is a formal language that is particular good at denoting


relationships among numbers and symbols. Chemists use a formal language to represent the chemical structure of molecules.

Programming languages are Formal languages that have been designed to express computations.


The first program:

Traditionally, the first program written in a new language is called Hello, World!because all it does is display the words, “Hello, World!” in python, it looks like this:

>>>Print (“Hello, World!”)


This is an example of a Print statement which doesn’t actually print anything on a paper. It is display a value on the screen. In this case, the result is the words

>>>Hello, World!


The quotation marks in the program the beginning and end of the value; they don’t appear in the result.

Glossary:


Problem solving: The process of formulating a problem, finding a solution, and expressing the solution.

High-level language: The python language is designed to be easy for humans to read and write.

Low-level language: A programming language that is designed to be easy for a computer to execute; also called Machine language or Assembly language”.

Interpreter: To execute a program in a high-level language by translating it one line a time.

Compiler: To translate a program written in high-level language into a low-level language all at once, in preparation for later execution.

Source code: A program in a high-level language before being compiled. Object code: The output of the compiler after it translates the program. Executable: Another name for object code that is ready to be executed. Script: A program stored in a file (usually one that will be interpreted). Program: A set of instructions that specifies a computation.
Algorithm: A general purpose for solving a category of problem.

Bug: An error in a program.

Debugging: The process of finding and removing any of the three kinds of programming errors.


Syntax: The structure of program.

Syntax error: An error in a program that makes it impossible to parse (and therefore impossible to interpret).

Runtime error: An error that does not occur until the program has started to execute but that prevents from continuing.

Exception: Another name for run time error.

Semantic error: An error in a program that makes it do something other than what the program intended.

Semantics: The meaning of program.

Natural language: Any one of the languages that people speak that evolved naturally.

Formal language: Any one of the languages that people have designed for specific purpose, such as representing mathematical ideas or computer programs; all programming languages are formal languages.

Token: One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language.

Parse: To examine a program and analyze the syntactic structure.

Print statement: An instruction that causes the python interpreter to display a value on the screen.

No comments:

ads3