Python Programming Tutorial – 30 – init
24 responses to “Python Programming Tutorial – 30 – init”
Not cool man. -Subscribed!
Another great tutorial!
british wannabe init
fuckin tuna xD
I like your video but could you activate the automatic subtitle for this video? thanks!
Is init like constructor ??
Excellent explanation as always.
hi, you could call it energylevel (for exemeple)in place of init and it would work, isn t it?
7 dislikes ??? welp… 7 Jasons spotted*
Can you please open the auto translate from English ?? Sometimes I miss what you say so I can't understand %100 when I dont read them.
dude where is the 1080p version ..
def _init_(self, energy, health, stealth, strength, speed, stamina, composure, repair_speed, luck):
self.energy = energy
self.health = health
self.stealth = stealth
self.strength = strength
self.speed = speed
self.stamina = stamina
self.composure = composure
self.repair_speed = repair_speed
self.luck = luck
def _init_(self, health, strength, speed, stamina):
self.health = 500
self.strength = 95
self.speed = 75
self.stamina = 100
enemy = Enemy(500, 95, 75, 100)
aj_mason = Player(100, 100, 100, 50, 45, 100, 100, 50, 20)
adam_polomino = Player(50, 100, 20, 75, 50, 100, 95, 40, 20)
debrah_kim = Player(50, 100, 100, 10, 40, 100, 40, 85, 20)
jenny_myers = Player(50, 100, 100, 10, 40, 100, 90, 40, 20)
aj_mason.getEnergy(), aj_mason.getHealth(), aj_mason.getStealth(), aj_mason.getStrength(), aj_mason.getSpeed(), aj_mason.getStamina(), aj_mason.getComposure(), aj_mason.getRepairSpeed(), aj_mason.getLuck()
For all you Bioshock fans out there, I made this class function for you. 🙂
def _init_(self, x):
self.energy = x
Andrew_Ryan = Enemy(5)
Frank_Fontaine = Enemy(18)
print("Andrew Ryan has 5 energy. What a nooblet!")
print("Franky has 18 energy. If you ask me, that lunatic had too much Adam.")
subtitle, please !!
Hi.Bucky, can u give more detail about "self"?
clean,simple,tight,I don't know what to call this ,definitely the best Python Tutorial I have ever seen!
Hi new boston I been stuck on understanding classes for ages !!! and I have paid for material I come on here watch your video and bam ! I finally understand Amazing content dude I would pay for your series it's fantastic thank you very much for all your effort I'm sure I'm not the only one here that appreciates it
i typed the same code still im getting an error..And it says this
Traceback (most recent call last):
File "C:/Users/admin/PycharmProjects/untitled1/sada.py", line 8, in <module>
jason = Enemy (5)
TypeError: object() takes no parameters
Process finished with exit code 1
so init is like a constructor in C++ ?
so sweet ! 😀 Love it ! 😀 thanks a lot! 🙂
WOW I finally got it after a bunch of confusing tutorials!
الف سلامة هههه
Found your tutorial awesome. Sometimes I can't understand people well as I'm not a native english speaker. Although my english isn't that good I could understand you pretty well, and I got with ease how a class works in python. Thank you very much for your very useful tutorial.
Jason is evil :))