AC
AnkiCollab
AnkiCollab
Sign in
Explore Decks
Helpful
Join Discord
Download Add-on
Documentation
Support Us
Notes in
Week 1 - Intro to OOP
To Subscribe, use this Key
west-vermont-lithium-california-seventeen-black
Status
Last Update
Fields
Published
10/15/2024
Some ways that OOP can reduce the complexity of code are:They {{c1::group}} related things{{c2::Abstracting}} things awayCreating {{c3::hier…
Published
10/15/2024
{{c1::Object-oriented programming (OOP)}} is a programming paradigm based on the concept of "objects", which contain data and methods.
Published
10/15/2024
Key principles of OOP include {{c1::encapsulation}}, {{c2::inheritance}}, {{c3::polymorphism}}, and {{c4::abstraction}}.
Published
10/15/2024
{{c1::Encapsulation}} involves bundling data and the methods that operate on that data into a single unit, typically a class.
Published
10/15/2024
In OOP, a {{c1::class}} is a template that defines properties and behaviors, while an {{c2::object}} is an instance of a class.
Published
10/15/2024
{{c1::Inheritance}} allows one class to inherit properties and behaviors from another class, promoting code reuse.
Published
10/15/2024
{{c1::Polymorphism}} allows methods to do different things based on the object they are acting on, providing flexibility in code design.
Published
10/15/2024
{{c1::Abstraction}} hides the complex implementation details and shows only the essential features of an object.
Published
10/15/2024
In Python, classes are created using the {{c1::class}} keyword followed by a block of code that defines attributes and methods.
Published
10/15/2024
{{c1::Python}} is an interpreted, high-level, object-oriented programming language with dynamic semantics, widely used for rapid application developme…
Published
10/15/2024
The {{c1::__init__}} method is a constructor in Python classes, which initializes an object with initial attributes when it is created.
Published
10/15/2024
{{c1::Numpy}} is a library in Python used for working with arrays, matrices, and performing mathematical operations on large datasets.
Published
10/15/2024
{{c1::Matplotlib}} is a plotting library in Python used for creating static, interactive, and animated visualizations.
Published
10/15/2024
{{c1::PEP 8}} is the style guide for Python code, providing conventions for writing readable and consistent code.
Published
10/15/2024
Numpy arrays can be created using the function {{c1::numpy.array}} which generates an array from a list or tuple of values.
Published
10/15/2024
The {{c1::Linear Least Squares}} method is used to find the best-fitting straight line to a set of data points by minimizing the sum of the squares of…
Published
10/15/2024
The Python package {{c1::Matplotlib}} is used for plotting data, such as line graphs and scatter plots.
Published
10/15/2024
In Numpy, array slicing allows for selecting multiple elements of an array by specifying a {{c1::range of indices}}.
Published
10/15/2024
In Matplotlib, the function {{c1::plot()}} is used to create a line graph, where data points are connected by lines.
Published
10/15/2024
The {{c1::Linear Least Squares}} method is commonly used for fitting a polynomial of degree k to data points in regression analysis.
Published
10/15/2024
The {{c1::__del__}} method in Python is a destructor method that is called when an object is about to be destroyed, allowing for cleanup before the ob…
Published
10/15/2024
The command {{c1::numpy.linspace}} generates an array of evenly spaced numbers over a specified interval.
Published
10/15/2024
To generate an array of zeros with a specific shape, you use {{c1::numpy.zeros(shape)}}.
Published
10/15/2024
The command {{c1::numpy.reshape}} changes the shape of an array without changing its data.
Published
10/15/2024
To generate an identity matrix, the Numpy command is {{c1::numpy.eye(N)}}.
Published
10/15/2024
The command {{c1::numpy.random.randn}} generates samples from a standard normal distribution.
Published
10/15/2024
To concatenate arrays along a specified axis, you use {{c1::numpy.concatenate}}.
Published
10/15/2024
The function {{c1::numpy.dot(A, B)}} computes the dot product of two arrays.
Published
10/15/2024
To transpose a matrix, the Numpy command is {{c1::numpy.transpose}} or using {{c2::array.T}}.
Published
10/15/2024
To get the sum of array elements over a specified axis, use {{c1::numpy.sum(array, axis=)}}.
Published
10/15/2024
To create a scatter plot, the Matplotlib command is {{c1::plt.scatter(x, y)}}.
Published
10/15/2024
The command {{c1::plt.bar}} creates a bar chart from a set of x and y values.
Published
10/15/2024
The command {{c1::plt.hist}} is used to plot a histogram from data.
Published
10/15/2024
To label the x-axis of a plot, you use the Matplotlib command {{c1::plt.xlabel}}.
Published
10/15/2024
To save a figure in Matplotlib, the command is {{c1::plt.savefig('filename.png')}}.
Published
10/15/2024
To display the plot, the final command in Matplotlib is {{c1::plt.show()}}.
Published
10/15/2024
To add a legend to a plot, the command is {{c1::plt.legend()}}.
Published
10/15/2024
The function {{c1::plt.plot}} is used to create a line plot with x and y data.
Published
10/15/2024
To set the title of a plot, the command is {{c1::plt.title('Title')}}.
Published
10/15/2024
To create a pie chart, use the Matplotlib command {{c1::plt.pie}}.
Status
Last Update
Fields