Unit 9Introduction to Python
Follows IGNOU MCS-201, Unit 9
Python is a high-level language that lets you express in a few lines what takes many lines in C. It is used for web applications, data science, machine learning, automation and teaching. This unit starts the Python half of MCS-201: it compares Python with the C you have just studied, traces Python’s history, surveys where and with which tools it is used, explains how Python programs are organised into modules and packages, and ends with installing Python and running your first program.
In this unit you will learn to
- Describe what kind of language Python is and how it differs from C.
- Outline Python’s history, the Python 2 to Python 3 change, and the main implementations (CPython, PyPy, Jython, IronPython, MicroPython).
- Name the main application areas of Python and the libraries used in each.
- Distinguish modules, packages, libraries and frameworks, and import them correctly.
- Explain how a Python program is structured across files.
- Install Python, choose an editor, and run a program in interactive and script mode.
Sections in this unit
- 9.1Python and C ComparedWhat kind of language Python is, how its execution, typing and memory management differ from C, and when each language is the better choice.12 min
- 9.2History and Implementations of PythonHow Python developed from 1989 to today, why Python 3 replaced Python 2, and how CPython, PyPy, Jython, IronPython and MicroPython differ.9 min
- 9.3Why Python: Application AreasWhere Python is used in industry, from AI and data science to web, mobile, embedded and game development, and why it suits each area.9 min
- 9.4Modules, Packages, Libraries and FrameworksThe difference between a module, a package, a library and a framework in Python, how to import each, and how package init files work.11 min
- 9.5Popular Python Libraries and FrameworksWhat the major Python libraries for machine learning, data science, web, mobile, games and scraping are used for, and which are current.9 min
- 9.6Program Structure in PythonHow a Python program is split into a top-level script and imported modules, how indentation forms blocks, and how a file knows it is run directly.9 min
- 9.7Getting Started and Running Your First ProgramInstall Python, choose between IDLE, VS Code, Jupyter, Anaconda and Google Colab, and run code in interactive mode and as a script.11 min