0% found this document useful (0 votes)
5 views3 pages

Python Basics for Class 11 Students

Python is a high-level, interpreted programming language known for its simplicity and readability. It supports various data types, execution modes, and operators, while also emphasizing the importance of indentation for code structure. The language includes features like comments, variables, and error handling, making it versatile for different programming paradigms.

Uploaded by

sharmaanshak07
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views3 pages

Python Basics for Class 11 Students

Python is a high-level, interpreted programming language known for its simplicity and readability. It supports various data types, execution modes, and operators, while also emphasizing the importance of indentation for code structure. The language includes features like comments, variables, and error handling, making it versatile for different programming paradigms.

Uploaded by

sharmaanshak07
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Class 11 Computer Science – Chapter 5 (Sumita Arora)

Getting Started with Python

1. Introduction

Python is a high-level, general-purpose, interpreted language developed by Guido van Rossum in


1991.

2. Features of Python

- Simple and readable

- Free and open-source

- Portable

- Extensible

- Rich standard library

- Supports multiple paradigms

3. Execution Modes

Interactive Mode: Executes commands line by line.

Script Mode: Code is saved in .py files and executed.

4. Program Structure

Includes statements, expressions, comments, and indentation.

5. Comments

Single-line: # comment

Multi-line: """ comment """

6. Variables

Variables store values and are created through assignment.

Rules:
- Start with letter or underscore

- Case-sensitive

- No special characters except underscore

7. Data Types

Numeric (int, float, complex)

Boolean (True, False)

String ("text")

NoneType (None)

8. Operators

Arithmetic: + - * / % // **

Relational: == != > < >= <=

Logical: and or not

Assignment: = += -=

Membership: in, not in

Identity: is, is not

9. Expressions

Combination of operators and operands.

10. Input and Output

input(): takes user input as string

print(): displays output

Supports sep and end parameters.

11. Indentation

Mandatory for defining code blocks.

12. Errors
Syntax Errors

Runtime Errors

Logical Errors

13. Keywords

Reserved words like if, else, while, for, break, continue, True, False, None, etc.

Summary

Python is simple, interpreted, and powerful. It uses indentation, supports many data types, and
provides strong input/output functionalities.

You might also like