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

Day1 - Introduction To Python

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

Welcome

to

Python Programming

CMC
Content
 Introduction to Programming
 Introduction to Python
 History of Python
 Features of Python
 Where is Python uses?
 What can Python do?
 Python used by Companies
 Python’s Version
 Python Installation –
🞑 Anaconda Distribution
🞑 Google colab
Programming

•Astronomers Programmer
•Biologists •Logical thinking
•Al-Chemists • ‘some’ domain
•Engineers knowledge
•Scientists
can be • some coding
Programmers
language
•Statisticians • More patience
•Students • Google, github,
•Gamers stackoverflow, fellow
•Economists programmers,
•Oceanographers communities
•Biomedical…
Programming

To become a good Programmer


Logical thinking
Given Problem statement

Algorithm
Step1
Input data- Step2 Output /result
i/p ….
Some procedure
.
Some conditions

Some repitions
Programming

To become a good Programmer


Logical thinking
Given Problem statement

Algorithm

i/p Output /result


Introduction to Python

“You are experts in your domain specific Knowledge”,

Python is a general purpose, dynamic, high level and


interpreted programming language. It supports Object Oriented
programming and procedure oriented approach to develop
applications. It is simple and easy to learn and provides lots of
high- level data structures.

Python is a dynamically typed multiparadigm programming language.


Python code is often said to be almost like pseudocode, since it allows
you to express very powerful ideas in very few lines of code while being
very readable.
History of Python
Python was created by Guido Van Rossum when he
was working at National Research Institute for
Mathematics and Computer Science in Netherlands.
The language was released in 1991. Python got its
name from a BBC comedy series - “Monty Python’s
Flying Circus”.
History of Python
 Python is derived from many other languages, including ABC,
Modula-3, C, C++, Algol-68, SmallTalk, and Unix shell and
other scripting languages.

 Python is copyrighted. Like Perl, Python source code is now


available under the GNU General Public License (GPL).

 Python is now maintained by a core development team at the


institute, although Guido van Rossumstill holds a vital role in
directing its progress.
Features of Python
 It is a general purpose programming language which can be used for both scientific
and non scientific programming.

 It is a platform independent programming language. Python works on different


platforms (Windows, Mac OS, Linux, Raspberry Pi, etc).

 It is a very simple high level language with vast library of add-on modules.

 Python runs on an interpreter system, meaning that code can be executed as soon as
it is written. This means that prototyping can be very quick.

 Programs written in Python are easily readable and understandable. It’s Syntax
very simple that’s why Python is said to Beginner's programming Language.

 It is suitable as an extension language for customizable applications.

 It is easy to learn and use. It is Open source programming language.


Where is Python uses?
It is used for:
 Web development (server-side)

 Software development

 Mathematics

 System scripting
Q. What can Python do?

 Python can be used on a server to create web


applications.
 Python can connect to database systems. It can also
read and modify files.
 Python can be used to handle big data and
perform complex mathematics.
 Python can be used for rapid prototyping, or for
production-ready software development.
Python used by Companies
 In operations of Google search engine, youtube etc.

 Bit Torrent peer to peer file sharing is written using Python.

 Intel, Cisco, HP, IBM, etc use Python for hardware testing.

 Maya provides a Python scripting API programming


(application interface)

 i–Robot uses Python to develop commercial Robot.

 NASA, ISRO and others use Python for their scientific


programming task.
Python’s Version
Python has basically two Version:
 Python2.x

 Python3.x

 Python 2.0 was released on 16 October 2000 with


many major new features, including a garbage
collector.
 Python 3.0 was released on 3 December 2008.
Python Install
 Many PCsand Macs will have python already installed.

 Tocheck if you have python installed on a Windows PC, search in the start
bar for Python or run the following on the Command Line (cmd.exe):
C:\ Users\ Your Name>python –version

 To check if you have python installed on a Linux or Mac, then on linux open
the command line or on Mac open the Terminal and type:
python –version

 If you find that you do not have python installed on your computer, then you
can download it for free from the following
website: https:/ / www.python.org/
Working in Python
 Before you start working in Python, you need to install Python
on your computer.

 There are multiple Python Distributions available.

1. Default installation available from www.python.org is called


CPython installation and comes with Python interpreter,
Python IDLE(Python GUI) and Pip(package installer).

2. Other is Anaconda Python Distribution is one such highly


recommended distribution that comes preloaded with many
packages and libraries
(e.g., NumPy, SciPy, Panda libraries etc. )
Jupyter Notebook
 Jupyter Notebook is an open source web
application.

 It can be use to create and share documents that


contain live code, equations, numerical simulation,
statistical modeling, data visualization, machine
learning and much more.
Working in Jupyter Notebook
In order to work jupyter notebook, you need to first launch it
using Anaconda Navigator as it has come preloaded with
Anaconda Distribution.
Step 1: Launch Anaconda Navigator.
Step 2: From the Anaconda Navigator window, click on Launch
below Jupyter notebook tile.
Working in Jupyter Notebook
Step 3: Since jupyter notebook is web based computing
environment, it will be launched in a web browser.
Step 4: On the notebook dashboard, click New button and select
Python 3.
Working in Jupyter Notebook
Step 5: it will open a new notebook where you can write and run
your code.
Working in Jupyter Notebook
Step 6: Interactive Mode
Torun Python code in interactive mode, type code in cell
and click run.
Working in Jupyter Notebook
Step 7: Script Mode
To run a script mode :
(a)Write the code of a Python script (a group of Python
commands) in a code cell.
(b) Now click on its name to give new name.
Working in Jupyter Notebook
(c) Click on Save icon first to save it and now click Run
to run your Script.
Google colab

Lets login to colab….


References

https://colab.research.google.com/github/cs231
n/cs231n.github.io/blob/master/python-
colab.ipynb#scrollTo=RbFS6tdgL9ea

https://colab.research.google.com/notebooks/sn
ippets/importing_libraries.ipynb

https://colab.research.google.com/github/cs231
n/cs231n.github.io/blob/master/python-
colab.ipynb#scrollTo=VOxGatlsL9fd

You might also like