Introduction to Python

Two kind of programming process is used to execute high-level into low-level programs:
(a) Interpreters – An interpreter reads a high-level program and performs computations.
(b) Compilers – Compilers translates the high-level programs into object code/ executable files. Once a program is compiled, you can execute it repeatedly without further translation.

Python is interpreter language. There are two ways to use the interpreter: interactive mode and script mode. In interactive mode, you just type Python programs and the interpreter displays the result. In script mode, you can store code in a file and use the interpreter to execute the contents of the file.

Three kinds of errors can occur in a program:
(a) Syntax errors – If there is a syntax error, Python won’t execute the program.
(b) Runtime errors – They usually indicate that something exceptional has happened and.
(c) Semantic errors – It won’t show any error message in terms of computer program, but the program won’t show the results are you wanted.

Simple hello world program


print 'Hello, World!'
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s