Getting Started with Python: A Class 11 NCERT Guide
By ConceptScroll Team · Published on 17 July 2026 · 4 min read

Getting started with Python is essential for Class 11 NCERT students learning Computer Science. This guide introduces Python basics, operators, and practical examples to build a strong foundation in programming.
Introduction to Python Programming for Class 11
Python is a popular, easy-to-learn programming language widely used in academics and industry. For Class 11 NCERT students, Python provides a simple syntax and powerful features to start programming confidently. It supports various data types, control structures, and operators that allow you to write clear and effective code. Learning Python lays the foundation for advanced computer science concepts and practical applications.
Understanding Python Operators and Their Categories
Operators in Python are special symbols that perform operations on variables and values called operands. Python has six main categories of operators:
- Arithmetic Operators: Perform basic math operations like addition (+), subtraction (-), multiplication (*), division (/), modulus (%), floor division (//), and exponentiation (**).
- Relational Operators: Compare two values and return True or False. Examples: equals (==), not equals (!=), greater than (>), less than (<), greater or equal (>=), less or equal (<=).
- Assignment Operators: Assign values to variables. Basic assignment uses =. Compound assignments combine arithmetic and assignment, such as +=, -=, *=, /=.
- Logical Operators: Work with Boolean values to perform logical operations: and, or, not.
- Identity Operators: Check if two variables point to the same object using is and is not.
- Membership Operators: Test if a value exists in a sequence using in and not in.
Knowing these operators helps you write expressions that perform calculations and make decisions.
Want to test yourself on Getting Started with Python? Try our free quiz →
Operator Precedence and Associativity in Python
Operator precedence determines the order in which parts of an expression are evaluated. For example, multiplication () has higher precedence than addition (+), so in the expression $3 + 4 5$, multiplication happens first, resulting in $3 + 20 = 23$.
Python’s operator precedence from highest to lowest is roughly:
| Precedence | Operators |
|---|---|
| Highest | Parentheses () |
| Exponentiation ** | |
| Unary plus +, Unary minus - | |
| Multiplication *, Division /, Floor division //, Modulus % | |
| Addition +, Subtraction - | |
| Relational operators (==, !=, >, <, >=, <=) | |
| Logical not | |
| Logical and | |
| Lowest | Logical or |
Use parentheses to override precedence and clarify your expressions.
Worked Example: Checking If a Dart Hits the Dartboard
Consider a dartboard with radius 10 units centered at (0,0). We want to check if a dart hitting at coordinates $(x, y)$ lands inside the board.
The condition is based on the distance from the center:
$$x^2 + y^2 \leq 10^2$$
This means the dart hits inside or on the board if the sum of squares of $x$ and $y$ is less than or equal to 100.
Python code snippet:
```python x = float(input("Enter x coordinate: ")) y = float(input("Enter y coordinate: "))
if x2 + y2 <= 100: print("Dart hits the board") else: print("Dart misses the board") ```
Try these coordinates:
- (0,0) → Hits
- (10,10) → Misses
- (6,6) → Hits
- (7,8) → Misses
Writing a Simple Python Program: Celsius to Fahrenheit Conversion
One of the first programs Class 11 students learn is temperature conversion. The formula to convert Celsius ($T_C$) to Fahrenheit ($T_F$) is:
$$T_F = T_C \times \frac{9}{5} + 32$$
Python program:
``python celsius = float(input("Enter temperature in Celsius: ")) fahrenheit = (celsius * 9/5) + 32 print(f"Temperature in Fahrenheit: {fahrenheit}") ``
Using this program:
- Boiling point of water (100 °C) is 212 °F
- Freezing point of water (0 °C) is 32 °F
This example demonstrates input, arithmetic operators, and output in Python.
Comparison Table: Common Python Operators
Here is a quick comparison of common Python operators useful for Class 11 NCERT students:
| Operator Type | Examples | Purpose |
|---|---|---|
| Arithmetic | +, -, *, /, %, //, ** | Perform mathematical operations |
| Relational | ==, !=, >, <, >=, <= | Compare values, return True/False |
| Assignment | =, +=, -=, *=, /= | Assign or update variable values |
| Logical | and, or, not | Combine or invert Boolean values |
| Identity | is, is not | Check if two variables are same object |
| Membership | in, not in | Test presence in sequences |
Understanding these helps you write clear and correct Python code.
Frequently asked questions
What are the main categories of operators in Python?
Python operators include arithmetic, relational, assignment, logical, identity, and membership operators.
How does operator precedence affect Python expressions?
Operator precedence determines the order operations are performed; higher precedence operators execute first.
How to check if a point lies inside a circle using Python?
Use the condition $x^2 + y^2 \leq r^2$ where $r$ is the circle's radius.
What is the formula to convert Celsius to Fahrenheit in Python?
Fahrenheit = Celsius × 9/5 + 32.
Can Python handle both arithmetic and logical operations?
Yes, Python supports arithmetic and logical operators for calculations and decision making.
Ready to ace this chapter?
Get the full Getting Started with Python chapter — interactive notes, diagrams, worked solutions, polls and a free practice quiz — in the ConceptScroll app.
Study smarter with ConceptScroll
Daily NCERT-aligned reels, AI doubt solving and chapter quizzes — all free.
Start learning freeContinue reading
- Understanding Societal Impact: Class 11 NCERT Computer Science Guide
Discover how digital technologies shape society and the responsibilities of netizens in Class 11 NCERT Computer Science. Understand the societal impact for safer online use.
- Understanding Societal Impact in Computer Science for Class 11 NCERT
This blog explains the societal impact of computer science for Class 11 NCERT students, focusing on digital footprints, privacy, and ethical use of technology.
- Understanding Societal Impact in Class 11 Computer Science
This blog explains the societal impact of technology, data protection, and intellectual property rights for Class 11 NCERT Computer Science students.