Introduction to Python-1

785 18 15
                                    

Python is a high level, object oriented programming language. It has simple and easy to learn syntax. It is good for beginners as well as for developers. Python is used in various fields now with its growth in popularity as compared to other Programming languages like Java, C, PHP, etc. Python was developed by Guido Van Rossum in February 1991.

Guido Van Rossum

Oops! This image does not follow our content guidelines. To continue publishing, please remove it or upload a different image.

Guido Van Rossum

Python was supposed to be a successor of the ABC language.
Python programming language was named after the famous BBC Comedy show, Monty Python's Flying Circus.

Advantages of Python

• Python has very easy to learn syntax. Thus it is programmer friendly.

• Python is an interpreted language. It means that it executes the code line by line at a time.

• Python runs on almost all platforms like Windows, Linux, Android, Mac, etc.

• Python is freely available online at www.python.org.

• Python comes with additional libraries and built-in functions.

• It is used for scripting, web applications using django, game development using panda, Database applications, etc.

• Python is more expressive than other Programming languages as it does the same work in lesser code.

Disadvantages of Python

• Python comes with many libraries but it doesn't have more libraries than Java, C, Perl, etc.

• It is difficult to convert or translate
python programs into another programming languages.

• Python is unable to catch
'Type-mismatch' issues. For example: When you store an number in a variable and later store string in the same variable then python didn't raise any error.

• Since python is an interpreted language it takes much time in the execution process.

Interpreter vs Complier

Interpreter: It converts the high level language into machine language line by line at a time. It displays the error at the same time and doesn't proceed unless the error is corrected.

Compiler: It converts the high level language into machine language in one go. It displays errors with its line number at the end of the program.

You can work in python in two modes:
✓Interactive Mode
✓Script Mode

Interactive Mode:
In python Shell, instructions are given in front of Python prompt ( >>> ) and gives output after each line.

Script Mode:
In Python Script, programs are saved with .py extension and gives whole output in one go.

Program to print text on screen

Input code:
print("Hi!!")
print("How are you?")

Output code:
Hi!!
How are you ?

If you have any queries, feel free to ask.

Learn PythonWhere stories live. Discover now