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

03.python Multi Paradigm

Uploaded by

sameekshasasone
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)
3 views3 pages

03.python Multi Paradigm

Uploaded by

sameekshasasone
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

[Link]-Multi-Paradigm.

md 2026-07-01

Python Programming Paradigms


A programming paradigm is a style or approach of writing and organizing programs.

Python is a multi-paradigm programming language, meaning it supports multiple programming styles.

1. Procedural Programming
Programs are written as a sequence of instructions (procedures/functions).
Focuses on functions and step-by-step execution.
Suitable for small and medium-sized programs.

Example:

def add(a, b):


return a + b

print(add(10, 20))

2. Object-Oriented Programming (OOP)


Programs are organized using classes and objects.
Helps in code reusability and maintainability.
Python fully supports OOP concepts.

OOP Features:

Class
Object
Encapsulation
Inheritance
Polymorphism
Abstraction

Example:

class Student:
def __init__(self, name):
[Link] = name

s = Student("Rahul")
print([Link])

3. Functional Programming

1/3
[Link] 2026-07-01

Focuses on functions rather than objects.


Functions can be passed as arguments and returned from other functions.
Encourages writing code without changing data (immutable style).

Common Features:

lambda
map()
filter()
reduce()
Recursion

Example:

numbers = [1, 2, 3, 4]

square = list(map(lambda x: x*x, numbers))

print(square)

4. Scripting Paradigm
Python is widely used as a scripting language.
Used to automate repetitive tasks.

Examples:

File handling
Backup scripts
Automation
System administration

5. Modular Programming
Large programs are divided into smaller modules.
Each module performs a specific task.
Improves code reuse and maintenance.

Example:

import math

print([Link](25))

Summary Table

2/3
[Link] 2026-07-01

Paradigm Focus Example

Procedural Functions and step-by-step execution Function-based programs

Object-Oriented Classes and objects Student class

Functional Pure functions and higher-order functions lambda, map(), filter()

Scripting Automation and scripting File and system automation

Modular Dividing code into modules import math

Government Exam Important Points


Programming Paradigm: Style or method of writing programs.

Python is a Multi-Paradigm Language.

Python supports:

Procedural Programming
Object-Oriented Programming (OOP)
Functional Programming
Scripting
Modular Programming

3/3

You might also like