Introduction to Python
Introduction to Python
Jan 6, 2025 1
What is Python?
Python is a general purpose interpreted
interactive object oriented and high level
programming language.
Interactive: You can use a Python prompt and interact with the
interpreter directly to write your programs.
Jan 6, 2025 3
Advantages of Python
Most programs in Python require considerably less number of lines
of code to perform the same task compared to other languages like
C .So less programming errors and reduces the development
time needed also.
There are large number of high-level programming languages like
C ,C++,Java etc. But when compared to all these languages
Python has simplest Syntax, availability of libraries and built-in
modules.
Python is also a cross platform language which means that the
code written for one operating system like Windows ,will work
equally well with Linux or MacOS without any changes to the
python code.
Jan 6, 2025 4
Why Python for beginners?
Easy to learn
Easy-to-use syntax
Jan 6, 2025 5
Why Python for beginners?
Stepping Stone to Programming universe
Python's methodologies can be used in a broad range of applications
Rising Demand for Python Programmers
Open- Source, Object Oriented, procedural and
functional
Not only a Scripting language, also supports Web Development
and Database Connectivity
Jan 6, 2025 6
Applications of Python
Machine Learning and Artificial Intelligence
Data Science and Data Visualization
Data Analysis
Web Development
Game Development
3D Graphics
Desktop GUIs
Automations
and many more…
Jan 6, 2025 7
Evolution of Python
Jan 6, 2025 8
Python Features
Jan 6, 2025 10
Python Features
Portable
Python is portable in the sense that the same code can be used on
different machines. Suppose you write a Python code on a Mac. If you
want to run it on Windows or Linux later, you don’t have to make any
changes to it. As such, there is no need to write a program multiple
times for several platforms.
Jan 6, 2025 12
Python Features
Interactive Mode
Python has support for an interactive mode which allows interactive testing and
debugging of snippets of code.
Jan 6, 2025 13
Python Features
Jan 6, 2025 14
Python is an interpreted language because programs are
executed by an interpreter.
There are two ways to use the interpreter.
C:\Users>python
Python 3.13.1 (tags/v3.13.1:0671451, Dec 3 2024, 19:06:28)
[MSC v.1942 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more
information.
>>> print(2+3)
5
>>> print("hii")
hii
Interactive Mode(Command-line mode)
Jan 6, 2025
Disadvantages of interactive mode
• The interactive mode is not suitable for large programs.
python test.py
Hello, Python!
Script Mode
Script mode is more suitable for writing long programs.