Now it is time to run Python yourself. This section explains how to install it, which tools to write code in, the two ways of running code, and your first programs.
Installing Python
System
How
Windows
Download the installer from python.org; tick “Add python.exe to PATH” on the first screen
macOS
Download the installer from python.org (or use Homebrew: brew install python)
Linux
Python 3 is usually pre-installed; otherwise use the package manager, for example sudo apt install python3
No installation
Use Google Colab in a web browser
Install the latest Python 3 release (Python 3.15 was released in October 2026; any recent 3.x version is fine for this course). Check the installation in a terminal:
Checking the installation
$ python3 --versionPython 3.15.0
On Windows the command is usually python or py; on macOS and Linux it is python3.
Where to write code
Tool
What it is
Good for
IDLE
Simple editor and shell installed with Python
First steps
VS Code
Free code editor with a Python extension
General programming; debugging
PyCharm
Full Python IDE (free Community edition)
Larger projects
Jupyter Notebook / JupyterLab
Browser-based notebooks of code cells, text and charts
Data science, experiments
Spyder
Scientific IDE with a variable explorer
Data analysis, MATLAB-like work
Anaconda
A distribution: Python plus hundreds of data-science packages and tools like Jupyter and Spyder
Data science on your own machine
Google Colab
Free hosted Jupyter notebooks in the browser, with NumPy, pandas and others preinstalled
No installation; using a GPU
An IDE (Integrated Development Environment) combines an editor, a way to run programs, and a debugger in one application.
Interactive mode and script mode
Interactive mode (shell, REPL)
Script mode
Start
Type python3 in a terminal, or open IDLE
Save code in a .py file and run python3 file.py
Prompt
>>>
None
Results
The value of each expression is shown automatically
Only what print outputs is shown
Kept?
No, lost when you exit
Yes, saved in the file
Use for
Trying ideas, quick calculations
Real programs
REPL stands for Read–Eval–Print Loop: the shell reads an expression, evaluates it, prints the result and waits for the next one.
Install the latest Python 3 from python.org, or use Anaconda or Google Colab.
Interactive mode (>>>) is for experiments; script mode runs saved .py files.
Jupyter and Colab run code cell by cell.
print() shows output; input() reads text, which must be converted for numbers.
Practice questions
Answer on paper first, then check. The explanation matters more than the letter you chose.
Question 6 · short answer
Write a program that asks for the length and breadth of a rectangle and prints its area, and explain why the conversion is needed.
Show worked answer
length = float(input("Length: ")), breadth = float(input("Breadth: ")), print("Area =", length * breadth). input() always returns a string, and multiplying two strings is not allowed (TypeError), so each value is converted with float() (or int() for whole numbers) before the calculation. For inputs 5 and 3 the program prints Area = 15.0.
MCA Online notes are made for reading on screen. Open https://mcastudy.online/mcs-201/introduction-to-python/getting-started-and-running-your-first-program/ to read this page.