CBSE 2026 results are out, Mukul scored a perfect 100/100 in Computer ScienceSee all toppers →

KwickAcademy Python · 9 min · free

Getting Started with Python: Features, IDLE, Interactive and Script Mode

9 min5 KwickClipsFull text belowFree
Next lesson →Kajal Ma'am (MCA), teaching since 2004Remembered in this browser

Get started with Python: what it is, installing Python and Jupyter, interactive vs script mode, your first program, comments and indentation. Python is a programming language, a way to give instructions to a computer, and its code is easy to read.

Follows the syllabus of: CBSE Class 11 Computer Science (083)

On screen in this lesson

What is Python?

A programming language: instructions for a computer
Easy to read, almost like simple English
Free, and runs on Windows, Mac and Linux
Created by Guido van Rossum, first released in 1991

Why is Python so popular?

Readable: short code, fewer mistakes
Libraries: ready-made code you can reuse
AI and data science use it widely
Also used for websites, games and automation

Installing Python

Open python.org and go to the Downloads page
Windows: download and run the Python install manager
If it asks to add Python to PATH, say yes
Mac: run the installer; IDLE is installed too

Where do we write Python?

ToolWhat it isGood for
IDLEcomes with Pythonbeginners
Jupyter Notebookcode in cellsdata and AI
Google ColabJupyter onlineno install needed

Installing Jupyter Notebook

Install Python first
Open Command Prompt or Terminal
Type: pip install notebook
Start it with: jupyter notebook

Interactive mode vs script mode

PointInteractive modeScript mode
WhereIDLE Shelleditor window
Runsone line at oncewhole file
Saved?noyes, as a .py file
Best forquick testsfull programs

Quick answers

What does a line starting with # do?

It is a comment. Python ignores it, so it never changes the output.

What happens if the line after an if is not indented?

Python gives an IndentationError.

KwickClips from this lesson

Short clips, one idea each. Good for revision the night before.

The full lesson, in text

Hello students, welcome to Kwickprep. Can one line of code make a computer greet you? In Python, yes, it can. Today we will learn what Python is, how to install it, and its two modes. Then we write a first program and learn comments and indentation.

Let us begin with the meaning of Python. A programming language is a special language we use to give instructions to a computer, and Python is one of them. Python code is easy to read, almost like simple English. It is free, and it works on Windows, Mac and Linux computers. It was created by Guido van Rossum and first released in nineteen ninety one.

Why do so many people choose Python? First, it is readable, so programs are short and mistakes are easier to find. Second, it has libraries, which are collections of ready-made code that you can reuse, like Pandas for tables and Matplotlib for charts. Third, it is widely used in artificial intelligence and data science. It is also used for websites, games, and automation, which means making the computer do boring jobs for you.

Here is how simple Python is. This one line shows a message on the screen. The word print is a function, which means a named command that does one job. The text inside the round brackets is what gets printed. The quotation marks tell Python that this is text. So the output is Namaste, India.

Now, let us install Python on a computer. Open the official website, python dot org, and go to the Downloads page. On Windows, download the Python install manager and run it, and it installs the latest Python three. If it asks to add Python to path, say yes, so your computer can find Python from anywhere. On a Mac, run the installer, and a tool called IDLE is installed along with Python.

We need a place to type and run our code, and there are three common choices. IDLE comes free with Python, and its full name is Integrated Development and Learning Environment, which is perfect for beginners. Jupyter Notebook lets you write code in small boxes called cells, and it is loved for data and artificial intelligence work. Google Colab is a Jupyter notebook that runs online in your browser, so nothing needs to be installed.

Jupyter Notebook does not come with Python, so we add it ourselves. First, make sure Python is installed. Then open Command Prompt on Windows, or Terminal on a Mac. Type pip install notebook, and press Enter, where pip is Python's tool for adding extra packages. When it finishes, type jupyter notebook, and it opens inside your web browser.

Python can be used in two modes, so let us compare them side by side. Interactive mode works in the IDLE Shell, while script mode uses a separate editor window. Interactive mode runs one line at a time, but script mode runs the whole file together. Work in interactive mode is not saved, but a script is saved as a file ending in dot pie. So interactive mode is best for quick tests, and script mode is best for full programs.

This is the IDLE Shell in interactive mode. The three arrow signs are called the prompt, and they mean Python is waiting for you. Type two hundred fifty plus forty and press Enter. The answer, two hundred ninety, appears at once. The star sign means multiply, so seven star six gives forty two. It works like a calculator, but when you close the window, this work is gone.

In script mode, we write many lines in a file, save it, and run it all at once. This file is named bill dot pie. A variable is a name that stores a value, so samosa stores fifteen and tea stores ten. The single equals sign puts a value into a variable. The last line prints samosa plus tea, so the output is twenty five. Because the file is saved, we can run it again tomorrow.

Here are the steps of script mode as a flowchart. In IDLE, click File, then New File, and type your code in the new window. Save it with a name like hello dot pie. Then click Run, then Run Module, or simply press the F five key. If Python shows an error message, fix the mistake, save again and run again. When there is no error, the output appears in the Shell window.

Let us write a complete first program. The variable name stores the text Asha. The first print shows Hello, then a comma separates it from the variable name. Python adds one space between the two items, so it prints Hello, Asha. The second print shows Welcome to Python on a new line. Each print starts on a new line by itself.

Now, the first grammar rule: comments. A comment starts with the hash sign and continues to the end of that line. Python ignores comments completely, so they never change the output. We write them to explain the code to people who read it, including ourselves later. For a long note, programmers often use text inside three quotation marks, though strictly that is a string.

Pause and predict. The price is forty rupees for one thali, and the quantity is three. How many lines will this program print? Just one line, one hundred twenty. The last print has a hash sign at its start, so the whole line is a comment. Programmers do this to switch off a line without deleting it.

The second grammar rule is indentation. Indentation means the spaces at the start of a line. Python uses these spaces to group lines together into a block. Whenever a line ends with a colon, the lines below it must be indented. Four spaces is the usual choice, and every line in one block must have the same spaces.

Here marks is eighty. The word if checks a condition, and greater than or equal to compares two numbers. Eighty is greater than or equal to thirty three, so the condition is True. The two indented lines form the if block, so both run. The last line has no indent, so it is outside the block and always runs.

Python gives each mistake an exact error name, and exams ask for these. If the line after an if has no indent, Python gives an indentation error. If a normal line starts with an extra space, that is also an indentation error. If you forget the colon at the end of the if line, Python gives a syntax error. If you spell print wrongly, Python does not know that name, so it gives a name error.

Let us revise what we learned today. Python is a readable, free language, widely used in artificial intelligence and data. We install it from python dot org, and IDLE comes with it. Interactive mode runs one line at a time, and script mode runs a saved file. To run a script, write it, save it as a dot pie file, and click Run Module. Comments start with a hash sign, and indentation groups lines into blocks.

Courses that teach this

CourseUnit
CBSE Class 9 Artificial Intelligence (417)Part B - Unit 5: Introduction to Python
CBSE Class 10 Artificial Intelligence (417)Part B Unit 7: Advance Python
CBSE Class 11 Computer Science (083)Computational Thinking and Programming - I
CBSE Class 11 Computer Science Essentials (083)Computational Thinking and Programming - I
CBSE Class 11 Informatics Practices (065)Introduction to Python
CBSE Class 11 Artificial Intelligence (843)Python Programming
Programming All levels PythonGetting Started with Python

Voice-over in this lesson is AI-generated. The script is written and checked by Kajal Ma'am. Boards can revise a syllabus mid-year, so confirm anything you plan around against the official board circular. Keep your passwords, OTPs and ID numbers to yourself — we never ask for them. To reach Kajal Ma'am, use the WhatsApp button; sharing your number there is how we call you back.

Free to watch, no sign-up. Live classes with Kajal Ma'am are the paid course; these lessons stay free either way.

Want a plan that actually fits your board dates?

Ask Kajal Ma'am directly, 20+ years teaching computer science. Free demo class first, no payment.

Talk to Kajal Ma'am on WhatsApp

Or see the Class 12 Computer Science course →

Studying outside India?

We coach CBSE, IGCSE & international students across the globe, one-to-one, in your local time zone.

Visit International →