python self nedir

Solutions on MaxInterview for python self nedir by the best coders in the world

showing results for - "python self nedir"
Naya
31 Nov 2019
1class Person:
2  def __init__(mysillyobject, name, age):
3    mysillyobject.name = name
4    mysillyobject.age = age
5
6  def myfunc(abc):
7    print("Hello my name is " + abc.name)
8
9p1 = Person("John", 36)
10p1.myfunc()
Juliana
01 Aug 2016
1'''
2Created on 14 Jan 2017
3@author: Ibrahim Ozturk
4@author: www.ozturkibrahim.com
5'''
6 
7class Musteri(object):
8    """Bir banka musterisinin hesabindaki tutari kontrol etme. Musteri sinifi
9    asagidaki ozelliklere sahiptir : 
10    Ozellikler:
11        isim   : Musteri ismini tutan string turunde parametre
12        bakiye : Musterinin hesabinda halihazirdaki bakiyeyi gosteren float tipinde parametre. 
13    """
14 
15    def __init__(self, isim, bakiye=0.0):
16        """Girilen isim ile ve baslangic bakiyesi olarak sifiri koyan musteriyi olusturur."""
17        self.isim    = isim
18        self.bakiye  = bakiye
19 
20    def paraCek(self, tutar):
21        """Hesaptan ilgili tutarin cekilmesinin ardindan yeni bakiyeyi doner."""
22        if tutar > self.bakiye:
23            raise RuntimeError('Bakiye yetersiz.')
24        self.bakiye -= tutar
25        self.bilgiGoster()
26        return self.bakiye
27 
28    def paraYatir(self, tutar):
29        """Hesaba ilgili tutarin yatirilmasinin ardindan yeni bakiyeyi doner.."""
30        self.bakiye += tutar
31        self.bilgiGoster()
32        return self.bakiye
33     
34    def bilgiGoster(self):
35        """Ilgili musterinin ismini ve hesap bakiyesini ekrana basar.."""
36        print(self.isim + " isimli musteriye ait bakiye >> " + str(self.bakiye) + " TL'dir.")
37     
38musteri1 = Musteri('Ibrahim Ozturk', 500.0)
39musteri1.paraCek(100.0)
40
queries leading to this page
what is def 28self 29 in pythonself self definition pythonpython use selfpython 2aself why to use self in pythonhow does self work in pythonpython self functionpython 2a 2aselfself in def pythonself in pythonthe self in pythonwhat is self in pythonself python explainedself in function in pythonwhat is self in pyhtonpython self defself pythonpython 3a 3d with selfself opyton what does self do in pythonself in python used forself pyself used in pythonpython what is selfself python nedirself pythonpython method self python self explainedself in pyhonhow to use self pythonself 28 29 python 28self 29 pythonwhat is self in python defself in python definitioncreate self function pytonwhen should i use self in pythonwhy self in pythonself function in pythonwhat is self in python 5cself 3d 27 27 22 pythonself en python self pythonself in pythonself pyhtonwhen to use self in pythonself meaning in pythonuse self in pythonselfin pythonpython self selfself pythonpython self exampleself py 2chow to self in pythonself in pytohnwhat is self pythonpython self 3dpython 2aselfpython self why 5bself 5d in pythonwhat 28self 29 in pythonpython function selfwhat is self in pythonpython self 3dpython this selfwhat is self function 28 29 in pythonpython using selfpython selfpython self nedira 28self 29 pythonself in function pytonself pyself method in pythonunderstanding self in python what is 22self 22 in pythonself pythondef python selfpython self self in pythonpython selfpython why use selfwhat is self in python 3fpython self nedir