Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Procedural or Object Oriented

Tags:

python

oop

I am new to programming and do not fully understand the difference between an object-oriented language and one that is procedural. What is the difference and what category does python fall under?

like image 758
tiwonge chirwa Avatar asked Sep 18 '25 03:09

tiwonge chirwa


1 Answers

First off, here are some general definitions regarding the different types of programming languages:

“ Functional programming (FP) is a programming paradigm — a style of building the structure and elements of computer programs — that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.” — Wikipedia

“ Object-oriented programming (OOP) is a programming paradigm based on the concept of “objects”, which may contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods.” — Wikipedia

“ Procedural programming is a programming paradigm, derived from structured programming, based upon the concept of the procedure call. Procedures, also known as routines, subroutines, or functions, simply contain a series of computational steps to be carried out.” — Wikipedia

As for Python,

Python supports both Object-Oriented and Procedural Programming approached as it is a high level programming language designed for general purpose programming. That is what people mean when they call it "multi-paradigm"

like image 192
Xavier Conzet Avatar answered Sep 19 '25 19:09

Xavier Conzet