Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
Samenvatting

Summary Object oriented in python

Beoordeling
-
Verkocht
-
Pagina's
1
Geüpload op
19-03-2023
Geschreven in
2022/2023

My document is for the students who want to understand the python oop in easiest way.

Instelling
Vak

Voorbeeld van de inhoud

Python Object Oriented Programming (OOP) - For Beginners



In Python you how you can create your own custom objects by making different classes in
Python. So people that have some knowledge of Python have written Python code before, but I
've not yet stepped up into kind of the intermediate stage which I 'm Gon na call is this working
with classes and objects and are looking to learn that. Python code is very important in writing
Python code and I know this hopefully should n't confuse any of you too much, but if I write say a
function so you know define hello and in here we just print hello like that. pretty much everything
in Python that we work with is actually an object of some kind of class.


Whenever you have this a dot operator. You have some name and then you have the two brackets
at the end here and maybe there 's some arguments that go inside of there. That is usually a
method that is acting on a specific object and in this case what it 's doing is we have the method
upper acting on the object of type string that is stored in this string variable.


A method is essentially just a function that goes inside of a class that 's the easiest way to define
it and for our basic example. Right now, all of our methods are gon na start with a parameter
called self and we 're going to talk about what this self parameter means and how all this works
later on. But let 's kind of build our way up to that. can define a few different methods and
operations that can be performed by this object. So what I 'm gon na say define I do n't know let
's just say meow I know this is wrong because it 's not a dog and we 'll talk about self in just a
minute. But I can define another method here and instead of printing something I could say
return let 'n't necessarily need to print something I can return. Something so I can have these
methods take arguments. every time we create a new dog object. We will pass a name through
this parameter, so self just stays here to denote the object itself.. every time that any of these
methods is called kind of invisibly you do N't get to see it. The actual reference to this dog object
is passed so that we can access attributes that are specific to each.


When we do something like a self-dot and then anything that we want we can call whatever we
want is equal to some value. we can reference them from methods inside of our class. So an
example of that is something like say define get underscore name. after that 's defined and I can
print d dot name like that and when we look here. We can see that those names get printed out.
objectoriented programming allows us to access data that is stored within a specific object and
do different things with it based on how different methods and different things are being called..
This just is pretty much. The blueprint that defines how a dog actually works how it operates
what it can do. a lot of people typically will stomp at kind of the previous example that I just gave
you now. I want to go. A little bit further and show you the advantage of doing multiple classes.
rather than just using one class.

Geschreven voor

Instelling
Vak

Documentinformatie

Geüpload op
19 maart 2023
Aantal pagina's
1
Geschreven in
2022/2023
Type
SAMENVATTING

Onderwerpen

$9.39
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
20cs072

Maak kennis met de verkoper

Seller avatar
20cs072 Sit
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
3 jaar
Aantal volgers
0
Documenten
1
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen