Python is an object-oriented programming language that uses classes, methods, and objects to model real-world situations. OOP allows for abstraction, inheritance, polymorphism, and encapsulation and is widely used. The document compares functional programming to OOP, noting that in OOP data is stored in objects rather than variables and provides examples of list methods like append(), remove(), and index().
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
34 views4 pages
OOP Python
Python is an object-oriented programming language that uses classes, methods, and objects to model real-world situations. OOP allows for abstraction, inheritance, polymorphism, and encapsulation and is widely used. The document compares functional programming to OOP, noting that in OOP data is stored in objects rather than variables and provides examples of list methods like append(), remove(), and index().
• Function output depends only on input • Python is an object-oriented programming
language. Others include Java, C++, C#, • Involves variables and functions JavaScript, Swift • Data is stored in variables • Involves classes, methods, and objects • Ex. Some Python Built in Functions: • Data is stored in objects—an object’s attributes • abs() • Ex. List methods: • pow() • list.append() • sum() • list.remove() • Every other function we have created so far… • list.index() BENEFITS OF OOP
• Uses objects and classes to represent things
• Allows modeling real world situations • Abstraction, inheritance, polymorphism, encapsulation • Widely used by programming