QUESTION IMAGE
Question
question 1
1 pts
what is the primary purpose of object - oriented programming (oop)?
○ to make code more complex and difficult to understand.
○ to organize and structure code by grouping data and operations on that data.
○ to eliminate the need for functions.
○ to write code that runs faster.
question 2
1 pts
what is a class in python?
○ a blueprint or template for creating objects.
○ a type of variable.
○ a built - in function.
○ a conditional statement.
Question 1: OOP organizes code by bundling data (attributes) and operations (methods) into objects, improving readability and maintainability.
Question 2: A class in Python defines the structure (attributes/methods) for creating objects, acting as a template.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
Question 1: To organize and structure code by grouping data and operations on that data.
Question 2: A blueprint or template for creating objects.