Facebook – https://www.facebook.com/TheNewBoston-464114846956315/
GitHub – https://github.com/buckyroberts
Google+ – https://plus.google.com/+BuckyRoberts
LinkedIn – https://www.linkedin.com/in/buckyroberts
reddit – https://www.reddit.com/r/thenewboston/
Support – https://www.patreon.com/thenewboston
thenewboston – https://thenewboston.com/
Twitter – https://twitter.com/bucky_roberts
Amazon Auto Links: No products found.
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
Not cool man. -Subscribed!
i typed the same code still im getting an error..And it says this
C:UsersadminAppDataLocalProgramsPythonPython36-32python.exe C:/Users/admin/PycharmProjects/untitled1/sada.py
Traceback (most recent call last):
File “C:/Users/admin/PycharmProjects/untitled1/sada.py”, line 8, in
jason = Enemy (5)
TypeError: object() takes no parameters
Process finished with exit code 1
hi, you could call it energylevel (for exemeple)in place of init and it would work, isn t it?
For all you Bioshock fans out there, I made this class function for you. 🙂
class Enemy:
def __init__(self, x):
self.energy = x
def get_energy(self):
print(self.energy)
Andrew_Ryan = Enemy(5)
Frank_Fontaine = Enemy(18)
Andrew_Ryan.get_energy()
Frank_Fontaine.get_energy()
print(“Andrew Ryan has 5 energy. What a nooblet!”)
print(“Franky has 18 energy. If you ask me, that lunatic had too much Adam.”)
bucky is smart, he deliberately makes small videos, each with over 100k views
why doesn’t this video have a transcript ? i am compiling transcripts for easy back referencing if i need a refresher and this video has none :< could you add one please +thenewboston
Can anyone explain me, what happens if we set two value in the same init?
I got error when i tried to set one more ‘y’ value in the same Object
As: def __init__(self, x, y):
fuckin tuna xD
dude you are obsessed with tuna 😀
Excellent explanation as always.
*came to the comments to look for a Jason that was offended*
Is init like constructor ??
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.
Another great tutorial!
What is a difference between using init and making it a “normal” function and using it to assign energy to enemy manualy? I do not see the advantage other than shortening the code.
“”blrblrlbrlrblrblrblbr” – Tuna” – Bucky
so sweet ! 😀 Love it ! 😀 thanks a lot! 🙂
Can you please add subtitle to this playlist. your tutorial are the best..
british wannabe init
dude where is the 1080p version ..
This may be a weird question, but… where does the energy variable come from?
init = constructor
Hey Bucky..
why your fish says “Blrrblrlbrlbrbr” if she knows human language
and can say “I am swimming” ?
This situation is not correct )))
7 dislikes ??? welp… 7 Jasons spotted*
Thank you so much for your Python Tutorial series! I have been taking a Python class in college and have been watching your videos that correspond to my course topics for clarification. You do a great job clearly and concisely getting the point accross, particuarly for Object Oriented Programs. Keep up the good work my friend!
How can I get this kind of Python, is it open source? The one I have is Shell version and it looks nothing like yours, im a total noobie so forgive my ignorance
Ok, I bought a vertical mouse. What to do with it now? Any tutorial on that?
الف سلامة هههه
hi sir
you are doing noble work
keep it up
class People:
def __init__(self,name,lang):
self.name = name
self.lang = lang
def get_con(self):
if int(self.lang) <= 0: print(str(self.name),"Your life seems to be over as a programmer") else: print(str(self.name),int(self.lang),'is good hoss!!') programming = People('Crish Shean',6) programming.get_con() program = People('Harsath',2) program.get_con() google = People('Ashfa Nihar',0) google.get_con()
Man you made 4000 tutorials that is normal thing that happened to your hands