Lecture1-Introduction To Python
Lecture1-Introduction To Python
Sherina Sally
ASSESSMENT CRITERIA
1
REFERENCES
How to think like a computer scientist: learning with Python / Allen Downey, Je®rey Elkner, Chris Meyers. ISBN 0-
9716775-0-6
Guttag, John. Introduction to Computation and Programming Using Python: With Application to Understanding
Data. MIT Press, 2016. ISBN: 9780262529624
OUTLINE
• History of Python
• Characteristics of Python
All Rights Reserved
• Flavors of Python
• Versions of Python
• Installing Python
2
INTRODUCTION TO PYTHON
• High-level language
HISTORY OF PYTHON
• Created by Guido van Rossum in late 1980’s
• Adopted the good features from ABC and introduced solutions to the flaws Guido van Rossum
3
CHARACTERISTICS OF PYTHON
• Platform independent
• Portable
FLAVORS OF PYTHON
Types of compilers which integrates other programming languages into Python
Cpython Implemented in C
4
VERSIONS OF PYTHON
Source: https://en.wikipedia.org/wiki/History_of_Python
0.9 1.2
1991 1995
1.0 1.1 2.0
Web
Development
Data Science
Engineering Applications
Applications
All Rights Reserved
Python
Business
Applications Scripting
Desktop
GUI
Applications
5
INSTALLING PYTHON
PYTHON SHELL
Execute python commands Execute Python scripts
All Rights Reserved
6
INTERACTIVE AND SCRIPT MODE
• Interactive mode
• Provides a quick method to execute code lines
• Script Mode
• Executes code written in a python file
Command Description
C:\Users> python Starts the python shell
C:\Users> python --version
or Displays the Python version installed in the computer
All Rights Reserved
C:\Users> python -V
C:\Users> python test.py Executes the test.py script and displays the result
>>> quit()
or Exits from the Python shell and returns to the windows console
>>> Ctrl-Z
7
IDE AND CODE EDITORS
• Provides syntax highlighting, code auto completion