0% found this document useful (0 votes)
8 views

ip

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

ip

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

Here's a summary of Unit 2: Basic Concepts of Python Programming:

===Variables and Data Types:

Variables: Store values in a name (e.g., x = 5)


Data Types:
Strings: Text enclosed in quotes (e.g., "Hello")
Numbers: Integers (e.g., 5) or floats (e.g., 3.14)
Lists: Ordered collections of values (e.g., [1, 2, 3])
Tuples: Ordered, immutable collections of values (e.g., (1, 2, 3))
Dictionaries: Unordered collections of key-value pairs (e.g., {"name": "John",
"age": 30})
===Operators:

Arithmetic Operators: +, -, *, /, **, etc.


Comparison Operators: ==, !=, >, <, >= , <=
Logical Operators: and, or, not
Assignment Operators: =, += , -=, *=, /=, etc.
===Control Structures:

Conditional Statements:
if statement: Execute code if a condition is true
elif statement: Execute code if the initial condition is false and another
condition is true
else statement: Execute code if all conditions are false
===Loops:
for loop: Iterate over a sequence (e.g., list, tuple, string)
while loop: Execute code while a condition is true
===Functions and Modules:

Functions: Reusable blocks of code that take arguments and return values
Modules: Pre-written code that can be imported and used in your program
This summary covers the key concepts in Unit 2 of the Class 11 IP syllabus. These
concepts form the foundation of Python programming and are essential for further
learning.

You might also like