Page 1: Introduction to Python
Python is a high-level, interpreted language known for simplicity.
Page 2: Features of Python
Easy syntax, Portable, Interpreted, Object-Oriented, Large libraries.
Page 3: Basic Syntax
Python uses indentation.
print('Hello World')
Page 4: Data Types
int, float, str, bool, list, tuple, dict, set.
Page 5: Variables
Variables store data.
x = 10
y = 'Hello'
Page 6: Operators
Arithmetic, Logical, Comparison operators.
Page 7: Conditional Statements
if, elif, else
if x>5:
print('Greater')
Page 8: Loops
for and while loops.
for i in range(5):
print(i)
Page 9: Functions
Reusable blocks of code.
def add(a,b):
return a+b
Page 10: OOP
Classes and Objects.
class Car:
def drive(self):
print('Driving')
Page 11: Exception Handling
try and except.
try:
10/0
except:
print('Error')
Page 12: File Handling
Read and write files.
f=open('[Link]','w')
[Link]('Hello')
Page 13: Modules & Libraries
Import modules using import keyword.