Python Execution Modes
M3-R5.1 · Chapter 3: Introduction to Python · 5 min read
Python Execution Modes: Python supports two execution modes:
|
Mode |
Description |
|
Interactive Mode |
Used for quick testing (REPL mode). |
|
Script Mode |
Used for running complete Python programs from a file. |
How does Python Interpreter work?:
NOTE:
✅ The Python Interpreter reads, parses, and executes Python code.
✅ Python executes code in 5 steps (Source Code → Bytecode → PVM → Execution → Output).
✅ Python supports Interactive Mode (REPL) and Script Mode for execution.
✅ Programs can be run in terminal, command prompt, or IDEs.
Python Applications: Python is everywhere. There is nothing you can’t do with it. There are following application of Python
- Scripting – Python is great for server-side and other scripting
- Data Science
- Machine Learning
- Artificial Intelligence
- GUI and Game development
- Web development
- Computer Vision (CV)/ Image Manipulation
- Robotics
- Web Scraping
- Network Programming
- Numeric and Scientific Computing
- Enterprise applications
Many big companies use it or have used it for their products and services. there are some 10 companies using python Programming Language
As we know that the Python is a widely used high-level programming language. To write and execute code in python, we first need to install Python on our system. Installing Python on Windows takes a series of few easy steps.
Step 1 − Select Version of Python to Install
Python has various versions available with differences between the syntax and working of different versions of the language. We need to choose the version which we want to use or need. There are different versions of Python 2 and Python 3 available.
Step 2 − Download Python Executable Installer
On the web browser, in the official site of python (https://www.python.org/downloads), move to the Download for Windows section. All the available versions of Python will be listed. And recent version show on screen seperatally. Select the version required by you and click on Download. Let suppose, we chose the Python 3.13.7 version
On clicking download, various available executable installers shall be visible with different operating system specifications. Choose the installer which suits your system operating system and download the installer. Let suppose, we select the Windows installer (64 bits).The download size is less than 30MB.
Step 3 − Run Executable Installer
We downloaded the Python 3.13.7 Windows 32 bit OR 64 bit installer.
Run the installer. Make sure to select both the checkboxes at the bottom and then click Install New.
On clicking the Install Now, The installation process starts.
On clicking the Install Now, The installation process starts.
The installation process will take few minutes to complete and once the installation is successful, the following screen is displayed.
Step 4 − Verify Python is installed on Windows
To ensure if Python is successfully installed on your system. Follow the given steps −
- Open the command prompt.
- Type ‘python’ and press enter.
- The version of the python which you have installed will be displayed if the python is successfully installed on your windows.
Step 5 − Verify Pip ("PIP Installs Packages" or "Preferred Installer Program") was installed
Pip is a powerful package management system for Python software packages. Thus, make sure that you have it installed.
To verify if pip was installed, follow the given steps −
- Open the command prompt.
- Enter pip –V to check if pip was installed.
- The following output appears if pip is installed successfully.
We have successfully installed python and pip on our Windows system.