Kris Jordan
Kris Jordan
  • 179
  • 1 108 130
Object-oriented Programming in Python 101 - Classes, Methods, and __init__ Constructor Tutorials
0:00 - What is the purpose and intuition of object-oriented programming?
1:14 - Example of modeling a type of object by thinking of its attributes.
5:12 - Defining a Class with a class definition and its attributes.
6:50 - Defining the attributes of a class in Python using type annotations.
8:18 - Constructing a new object from a class definition.
9:31 - Assigning attribute values to objects in Python
12:00 - Printing a class, an object, and an attribute
13:35 - How are classes and objects represented in a memory / environment diagrams?
16:14 - The dot operator used to access attribute values of an object
19:21 - How to write a function with a parameter whose type is a class
21:35 - Calling a function with an object as an argument
22:45 - Passing a reference to an object in a function call in a memory diagram
23:35 - Benefits of objects as bundles of related variables when calling functions
25:07 - Defining new capabilities of a class with a method definition
28:45 - Writing a method call in Python given an object variable
30:00 - What happens when a method is called in Python? What is self bound to?
32:14 - Diagramming a method call in a memory / environment diagram with the self parameter
35:15 - Where does object-oriented programming get its name?
36:37 - How do you add parameters to a method? How do you call a method with arguments?
39:07 - Initializing default values for attributes of an object without a constructor
41:30 - Why have a constructor and how do you define the __init__ method/constructor?
45:00 - What happens when constructing an object whose class defines an __init__ constructor?
47:48 - Calling the same method on two different objects can return two different values.
48:50 - Diagramming an __init__ constructor call in a memory / heap diagram
51:57 - What is returned from a constructor / __init__ call?
52:48 - What is the purpose of a constructor or __init__ method in Python?
53:33 - Review of important object-oriented programming concept fundamentals
zhlédnutí: 13 415

Video

Jupyter Notebooks in VS Code Extension - Tutorial Introducing Kernels, Markdown, & Cells
zhlédnutí 24KPřed 2 lety
Jupyter Notebooks in VS Code Extension - Tutorial Introducing Kernels, Markdown, & Cells
Python 101 Tutorial - importing modules & functions - Why is __name__ "__main__" and when is it not?
zhlédnutí 9KPřed 2 lety
Python 101 Tutorial - importing modules & functions - Why is name " main " and when is it not?
Dictionaries - Python 101 Tutorial on the dict Data Type, key value pairs, checking keys, KeyError
zhlédnutí 13KPřed 2 lety
Dictionaries - Python 101 Tutorial on the dict Data Type, key value pairs, checking keys, KeyError
Python 101 Lists Tutorial - How to construct, append, access with subscription indices, sum, and pop
zhlédnutí 8KPřed 2 lety
Python 101 Lists Tutorial - How to construct, append, access with subscription indices, sum, and pop
Python 101 Tutorial - while Loop Statements - Writing simple loops and avoiding infinite loops.
zhlédnutí 9KPřed 2 lety
Python 101 Tutorial - while Loop Statements - Writing simple loops and avoiding infinite loops.
Python 101 Tutorial - if else conditional statements for dynamic control flow in programs
zhlédnutí 7KPřed 2 lety
Python 101 Tutorial - if else conditional statements for dynamic control flow in programs
Vectorized Operations in Python - Introductory Tutorial on the Semantics of Numpy-style Operators
zhlédnutí 3KPřed 3 lety
0:00 - Introduction to Vectorized Operations 1:40 - Conceptual example of a Vectorized Operations on String Arrays 6:06 - Example implementation setup 10:10 - Representing a StrArray as a str 11:30 - Implementing add with a string value on the right-hand side 15:56 - Importing annotations from future to allow self-references to classname from within class definitions 18:33 - Using the `Union` t...
Tutorial on Operator Overloading in Python with Special Methods such as __add__ and __getitem__
zhlédnutí 6KPřed 3 lety
Previous video introducing methods: czcams.com/video/N5wHzHf5klk/video.html Python documentation on special methods: docs.python.org/3/reference/datamodel.html#special-method-names
Methods in Python - Tutorial on the self parameter and writing mutable vs. immutable methods
zhlédnutí 2,3KPřed 3 lety
Video Introducing Classes, Objects, Constructors and Methods: czcams.com/video/JRHDDSTZtqQ/video.html - Watch this first!
Filtering Column-oriented Data using a list of booleans as seen in Numpy, Pandas, R, and More
zhlédnutí 7KPřed 3 lety
You can find the starter code for this video here: github.com/comp110-21s/comp110-21s-workspace/blob/master/lessons/ls19_filter_starter.ipynb
3rd Party Libraries in Python - Finding on PyPI, Installing with pip, and Importing in Programs
zhlédnutí 8KPřed 3 lety
3rd Party Libraries in Python - Finding on PyPI, Installing with pip, and Importing in Programs
Import Modules and Functions from the Python REPL, other Modules, and Jupyter Notebooks Tutorial
zhlédnutí 7KPřed 3 lety
Import Modules and Functions from the Python REPL, other Modules, and Jupyter Notebooks Tutorial
Jupyter Notebooks in VS Code with Python Extension - Tutorial Introducing Kernels, Markdown, & Cells
zhlédnutí 33KPřed 3 lety
Jupyter Notebooks in VS Code with Python Extension - Tutorial Introducing Kernels, Markdown, & Cells
for..in loops in Python for iterating through collections of values or indices within a range
zhlédnutí 4,3KPřed 3 lety
for..in loops in Python for iterating through collections of values or indices within a range
range in Python - Representing an immutable sequence of integers!
zhlédnutí 1,3KPřed 3 lety
range in Python - Representing an immutable sequence of integers!
Introduction to Sorting in Python with sorted, list.sort, and an implementation of insertion sort
zhlédnutí 1,9KPřed 3 lety
Introduction to Sorting in Python with sorted, list.sort, and an implementation of insertion sort
Memory Diagrams with Lists in Python
zhlédnutí 3,2KPřed 3 lety
Memory Diagrams with Lists in Python
Summation Algorithm with Lists and a Loops - COMP110
zhlédnutí 2,8KPřed 3 lety
Summation Algorithm with Lists and a Loops - COMP110
Python Function Call Semantics
zhlédnutí 8KPřed 3 lety
Python Function Call Semantics
Function Definition Syntax Tutorial in Python
zhlédnutí 8KPřed 3 lety
Function Definition Syntax Tutorial in Python
Functions 101 - An Intuitive Introduction in Python - Part 1 of 3
zhlédnutí 7KPřed 3 lety
Functions 101 - An Intuitive Introduction in Python - Part 1 of 3
What are Programs, Languages, and Interpreters? An introduction in the context of Python and CS1.
zhlédnutí 8KPřed 3 lety
What are Programs, Languages, and Interpreters? An introduction in the context of Python and CS1.
Brief Introduction to Computing Systems - User Space Processes, Shells, Kernels, and Hardware - CS1
zhlédnutí 19KPřed 3 lety
Brief Introduction to Computing Systems - User Space Processes, Shells, Kernels, and Hardware - CS1
Intermediate Python Puzzle #1: List Comprehensions - Powerful Syntax for Building Lists in Python
zhlédnutí 1,5KPřed 3 lety
Intermediate Python Puzzle #1: List Comprehensions - Powerful Syntax for Building Lists in Python
From Python to Java - Variables, If-else, while loops, comments, and basic type casting tutorial
zhlédnutí 4,1KPřed 3 lety
From Python to Java - Variables, If-else, while loops, comments, and basic type casting tutorial
Learning Java after Python - "Hello, World!" - Comparing a Simple Program Structure
zhlédnutí 10KPřed 3 lety
Learning Java after Python - "Hello, World!" - Comparing a Simple Program Structure
Python's Magic Method __repr__ Tutorial - Automagically produce string representations of objects.
zhlédnutí 9KPřed 3 lety
Python's Magic Method repr Tutorial - Automagically produce string representations of objects.
Generating Linked Lists Recursively - A tutorial and strategy for constructing recursive structures.
zhlédnutí 2,2KPřed 3 lety
Generating Linked Lists Recursively - A tutorial and strategy for constructing recursive structures.
Recursion Practice & Strategies in Python: A Tutorial on Solving Recursive Problems and Algorithms
zhlédnutí 26KPřed 3 lety
Recursion Practice & Strategies in Python: A Tutorial on Solving Recursive Problems and Algorithms

Komentáře

  • @kelvinmirhan9866
    @kelvinmirhan9866 Před 4 dny

    thank you kris

  • @wonderfulworld1128
    @wonderfulworld1128 Před 10 dny

    Sir please make a video on closures and lexical scoping in python. If like these videos you'll put on your platform with well diagramatic approach that you actually do, this actually makes your content valuable... and makes us visualisation better to excites us to learn more. Lot's of love and hat's off appreciation to your work...

  • @wonderfulworld1128
    @wonderfulworld1128 Před 11 dny

    I'm not understanding why we need to store function definition in heap, when all of work has to be done in stack memory???

    • @KrisJordan
      @KrisJordan Před 11 dny

      @@wonderfulworld1128 functions can be passed as arguments to other functions and references to their heap definitions are what get passed around (in Python). There's nothing special about the main function in Python, you can write it to return values of you'd like.

    • @wonderfulworld1128
      @wonderfulworld1128 Před 11 dny

      @@KrisJordan sir your mean to say that whenever a function def encounterd in python script python holds the name in global stack frame and it's reference is hold in the heap memory... Whenever a function is called in script a new call stake frame initialzed in stake memory and all its variables and values stores in that particular frame. My question is that when this function returning a value let say 4(immutable type) or any function inside (not been called yet), the value has to be gone to the the caller end.. and reference has been hold by the any variable let say num_result... but the return value where gone in the stack memory or heap memory?? And also the function we'd returned the definition of insided , where it gone?? Because I know whenever return statement encountered call stacks is removed and the reference it hold in heap it's all gonna be removed..sir please give me some examples to understand what's going in memory when all of this kind stuffs happens in code?? As you shared in this video like that, I would be very happy to learn something in detail???

  • @akhilareddy4098
    @akhilareddy4098 Před 12 dny

    Temporary breakpoint 1, main () at debug1.c:6 6 { (gdb) step 8 i=0; (gdb) s 9 h=100; (gdb) s 10 if(max(i,h)!=h) (gdb) s max (a=21845, b=1431654973) at debug1.c:20 20 { (gdb) s 22 uint32_t res=0; (gdb) s why it is getting max (a=21845, b=1431654973) while debugging.plzz rly this query

  • @gedtoon6451
    @gedtoon6451 Před 13 dny

    Strictly speaking the __new__ dunder method is the constructor and __init__ is an initialiser. Most people, including myself tend to gloss over the details and think of __init__ as the constructor.

  • @CaseySmith-d5v
    @CaseySmith-d5v Před 24 dny

    What if I want to keep the first column as a string and convert the following columns to floats?

  • @ashanhimself6350
    @ashanhimself6350 Před měsícem

    thank you for making this video

  • @avixx
    @avixx Před měsícem

    You're doin' good job!

  • @storybozo
    @storybozo Před měsícem

    This was very helpful

  • @leksikon
    @leksikon Před 2 měsíci

    I recently started learning Python - this video was incredibly useful in understanding ranges. Thank you so much for sharing this!

  • @GCAGATGAGTTAGCAAGA
    @GCAGATGAGTTAGCAAGA Před 2 měsíci

    Great tutorials! But, I've got really stupid question: 33:00 - if we increment *words pointer it would have the same effect as incrementing **word_ptr, right? It does "switch" to the next address or will it become just garbage?

  • @manoharsagunthalla9215
    @manoharsagunthalla9215 Před 2 měsíci

    Dear Jordon will you please put a separate video for how to get multiple inputs from user using split () and populate the dictionary. 2. One of the dictionary key is having list suppose I need to update the value in the list how to do that? How to add another key-value list in that dictionary?

  • @Ggwpleohar
    @Ggwpleohar Před 2 měsíci

    We need more, or at least I would have needed for the rest of this semester

  • @EmilyPalm
    @EmilyPalm Před 2 měsíci

    really well explained !

  • @johnjoyce
    @johnjoyce Před 2 měsíci

    Module is the wrong term here and may be confusing.

  • @landix537
    @landix537 Před 2 měsíci

    What is the font you are using ?

  • @pattyspanker8955
    @pattyspanker8955 Před 2 měsíci

    "And that would overlap with the pointer where we would store the pointer for two pairs if this were a pair node. _And that's okay_ !" Perfect moment to cue in the "this is fine" meme from one of the earlier lectures. 😆

  • @cc_snipergirl
    @cc_snipergirl Před 2 měsíci

    For some reason I thought it would be more complicated than this. Thank you!

  • @user-bd5mg2wi9p
    @user-bd5mg2wi9p Před 2 měsíci

    Very clear explanation. Thanks!

  • @ducksavage
    @ducksavage Před 2 měsíci

    Underrated, thank you so much

  • @anasqb607
    @anasqb607 Před 3 měsíci

    thanks for your effort

  • @robertleechford4250
    @robertleechford4250 Před 3 měsíci

    Thank you

  • @lattehour
    @lattehour Před 3 měsíci

    it`s the same as with pointers to arrays you have to use parenthesis around the *name because * has lower precedence than ( ) ... how else would the compiler even know that you ain`t actually declaring a ptr return type , ps when you want to use a function as a parameter in a function implemention you dont even need the pointer just write the function in the declaration and when you call that function it`s generalized by default you can simply call it with any function as the type you used in declaration e.g void euler_method( double generic_F(int, int) , dbl a , dbl b ) you can have as many as you want in the param list thne you simply use your euler_method( sqrt , 5.5, 3.3) the main ideea behind all pointer types is based on 3 reasons 1. type checking, interpretation and arithmetics without encapsulating the type of the object inside the Pointer Metadata this can`t be done as the compiler has absolutely no means of understanding the memory layout to do the arithmetics , it has no way to interpret the bits is it a double or a long int ? and it can`t understand the intent because dividing a char string by 3 has no purpose or meaning it`s absurd

    • @lattehour
      @lattehour Před 3 měsíci

      ps in assembly you can only have 6 in the param list dont know in C only ever used 3

  • @AshraRai
    @AshraRai Před 3 měsíci

    I found many videos on youtube about capturing group but this one is the best.

  • @dsvhs93
    @dsvhs93 Před 3 měsíci

    Thank you so much!

  • @bobsprite6711
    @bobsprite6711 Před 3 měsíci

    Excellent! Very clear and didactic!

  • @bigfoot1861
    @bigfoot1861 Před 4 měsíci

    that initialized = { x, y} variable will be gone after the function returns since it's on stack. You definitely need to malloc Point structure on heap

  • @RussTanner
    @RussTanner Před 4 měsíci

    This is the best presentation I have found on this subject anywhere. I finally understand how this actually works. Fantastic! Thank you.

  • @Inte8ranD
    @Inte8ranD Před 4 měsíci

    Hey Kris, my name is Radai. And I'm learning Python and so far, I've created my very own customer database and a simple calculator as well. My question is this, can you make a video using real life examples? Say for example voters for this coming election, people who believe in climate change, voters who want a new political party or fans that follow their favorite team in football, basketball or baseball. Using While Loop with if, elif, else statements and try and except blocks. So could you make a video on any of these subjects so that i can prepare for a job interview? @Kris Jordan

  • @gyanarihant7113
    @gyanarihant7113 Před 4 měsíci

    Awesome videos, sorry to see such quality content not get deserved attention! Thank you tho!

  • @davidoconnor8224
    @davidoconnor8224 Před 4 měsíci

    Excellent explaination, thanks!

  • @tuckerwebb5336
    @tuckerwebb5336 Před 4 měsíci

    The end of this video is too overcomplicated to explain functions to beginners. Use simpler examples for beginner videos.

  • @shekharchaurasiya5236
    @shekharchaurasiya5236 Před 4 měsíci

    You explained Shell Expansions very well. Thank you very much Kris! 😀

  • @nileshgopnarayan4464
    @nileshgopnarayan4464 Před 4 měsíci

    Pls. Suggest book for assembly & c programming

  • @cthecheese1620
    @cthecheese1620 Před 4 měsíci

    Me being in the 20% & 30% who got the first question right: I don't need a debugger, I have eyes! Me after seeing the results of adding a print statement: What the actual f--

  • @mauriciobainycuri9478
    @mauriciobainycuri9478 Před 5 měsíci

    Excellent