Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Tting Started With Python

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 12

Getting strated

with Python`
Here starts the
lesson!
01
Introduction
Introduction
Python

1. Python is a programming language developed by Guido Van Rossum in February 1991.

2. Python is based on or influenced with two programming languages

• ABC language

• Modula-3

3. Python is an easy-to-learn powerful object oriented language

4. It is a very high level programming language as powerful as many other middle level languages. But not so powerful as high-level

languages like C,C++, Java etc.

5. This programming language was named after famous BBC comedy show namely Monty Python’s Flying Circus.
Python -pluses Python -minuses

1. Easy to use object oriented language


2. Expressive language 1. Not the fastest Language
3. interpreted language 2. Lesser libraries than c, Java etc
4. Its completeness 3. Not strong on type binidng
5. cross-platform language 4. Not easily convertible
6. Free and open source
7. variety of usage/Appilcations
Python- pluses
1. Easy to use – It has very simple syntax rules. It is a very high level language and thus highly programmer friendly.

2. Expressive language – It needs fewer lines of codes compared to many other languages.

3. Interpreted language – Python is an interpreted language means the code is converted and executed line by line. It makes python

an easy to debug language and thus suitable for beginners to advanced users.

4. Its completeness – you need not download and install additional libraries. All types of required functionality is available through

various modules of python standard library

5. Cross- platform language – python can run equally well on different platforms- windows, Linux, Unix, Macintosh, super

computers, smartphones etc.


Python- pluses
6. Free and open source – It is freely available without any cost. Its source code is also available. You can modify, improve and

extend the open source software.

7. Variety of usage/Applications – Python is used in many diverse fields and applications

• Scripting

• Web applications

• Game development

• System administrations

• Rapid prototyping

• GUI programs

• Database applications
Python- Minuses
1. Not the fastest language – Python is interpreted language not fully compiled one. Python is first semi-compiled into internal byte

code , which is then executed by python interpreter. Fully compiled languages are faster compared to semi-compiled and

interpreted.

2. Lesser libraries – Python offers library support for almost all computing programs, but still not competent with languages like C,

Java, Perl as they have larger collections available.

3. Not strong on type-binidng– Python interpreter is not strong on catching ‘type-mismatch’ issues. Eg. If you declare a variable as

integer and later store a string, python will not pin point it.

4. Not easily convertible– Because of lack of syntax, python is an easy language to program. But because of this, it is difficult to

translate to any other programming language.


02
Working with
python
Working with Python
1. How to download python

There are multiple Python distributions available.

 Default installation available from www.python.org. It is called Cpython installation. It comes with python interpreter,

Python IDLE(Python GUI) and pip (package installer)

 Anaconda Python distribution. It is highly recommended because it is preloaded with many packages and libraries like

numpy, panda, scipy, matplotlib etc.

 Spyder IDE, PyCharm IDE

2. You can work in python in two different ways.

 Interactive mode (Immediate mode)

 Script mode
Working with CPython
The default distribution of Cpython comes with python IDLE(GUI based), Python interpreter and pip(package installer). You can work

in interactive mode as well as script mode.

1. Interactive mode

 Working in interactive mode means you type the command –one command at a time , and the python executes the

given command there and then gives you the output.

 The interactive interpreter of python is also called Python shell.

 Interactive mode is very useful for testing.

 Interactive mode does not save the commands entered.

 The output is sandwiched between the command lines


Working with CPython
2. Script mode

 Open IDLE. Click on file -> New in IDLE Python shell

 in the new window type the commands you want to save

 click on file -> save

 give a name for the file. Python files will be having the extension .py

 click on run -> run module

It will execute all the commands saved in the file in a separate shell window.

In script mode , you can store all commands together in the form of a script and can get all outputs together i.e. not

sandwiched as command and output.


Working with Anaconda
Distribution
 Anaconda distribution comes with many preloaded packages and libraries. You can work in it in both interactive and script modes.

 Anaconda distribution provides the following tools that you can use to work in python.

 Jupyter Notebook – web based interactive computing environment.

 Spyder - It is a powerful Python IDE with useful editing, interactive testing and debugging functions.

You might also like