Classes and Objects with Python - Part 2 (Python Tutorial #10)

  Рет қаралды 562,796

CS Dojo

CS Dojo

Күн бұрын

Object-oriented programming (OOP) in Python Part 2 - let's go!
Introduction to Classes and Objects Part 1: • Introduction to Classe...
Introduction to Classes and Objects Part 2: • Introduction to Classe...
Find the sample files here: www.csdojo.io/...
You can find this entire Python series in a playlist here: goo.gl/eVauVX
For more Python, I would recommend two of my online video courses.
- Get Ready for Your Coding Interview: goo.gl/RMCaxW
- Introduction to Data Visualization with Python: goo.gl/fZ5oVX
Also, keep in touch on Facebook: / entercsdojo

Пікірлер: 501
@ianprado1488
@ianprado1488 4 жыл бұрын
Name: Karen Personality: Aggressive
@swallowedinthesea11
@swallowedinthesea11 4 жыл бұрын
isCallingPolice: True
@amoskan5923
@amoskan5923 4 жыл бұрын
sippingMocha: True
@zzzfjord2688
@zzzfjord2688 4 жыл бұрын
isKidsListeningToKidzbop = True
@Itsdrax911
@Itsdrax911 4 жыл бұрын
askedformanager = True
@atlantic_love
@atlantic_love 4 жыл бұрын
@@Itsdrax911 Ian, intelligence: lacking
@lolface6940
@lolface6940 6 жыл бұрын
print("Thank you")
@zubairqureshi7541
@zubairqureshi7541 3 жыл бұрын
While True: Print("Ty")
@invisibleinsociety
@invisibleinsociety 3 жыл бұрын
@@zubairqureshi7541 ty ty ty ty ty ty ty ty ty ty........
@roilandofermante9827
@roilandofermante9827 3 жыл бұрын
Richard
@mingxing3033
@mingxing3033 2 жыл бұрын
Cout
@peterikediugwu632
@peterikediugwu632 2 жыл бұрын
@@mingxing3033 what on God's green earth is that abomination
@muhammadarith685
@muhammadarith685 6 жыл бұрын
coding is fun ......with Mr CS dojo.....
@rahulbhargava4999
@rahulbhargava4999 6 жыл бұрын
very true
@anshulanand02
@anshulanand02 3 жыл бұрын
@emaad hakeem yeah lol
@Lluviso
@Lluviso 6 жыл бұрын
i've seen all ur python videos, you're really an amazing teacher.
@hitlarrajbhandari
@hitlarrajbhandari 6 жыл бұрын
*Y.O.U A.R.E A.M.A.Z.I.N.G* _keeponcoding_
@rahulbhargava4999
@rahulbhargava4999 6 жыл бұрын
yeah.....great teacher
@complexitytr9098
@complexitytr9098 6 жыл бұрын
wOWW hitlar said!!!! There must be something in his video
@MrPallav2009
@MrPallav2009 4 жыл бұрын
#keeponcoding
@thomaswainwright5280
@thomaswainwright5280 4 жыл бұрын
Your name is hitler
@mahabuggeinani
@mahabuggeinani 4 жыл бұрын
Yeah
@martinkaspar5095
@martinkaspar5095 5 жыл бұрын
hello dear CS Dojo wow - a really overwhelming tutorial - very helpful and in all things Python. I like the sidenotes that you give to the idea and concepts that are used in JAVA. This is very interesting. I really like this ideas and your "CS-Dojo approach". Well your stuff is among of the very best python-ressources on the whole net. One question though can you put togehter the most important infos into a cheatsheet - a Summarizing Cheat Sheet to download: that would be fantastic. Above all: dear CS Doyo - you did a fantastic job explaining these concepts of Python programming! I am learning to code and your introduction helps me to fully grasp the ideas. keep up the great work - it rocks!! best regards martin
@FoxFireImr
@FoxFireImr 6 жыл бұрын
You’re fantastic! Love the way you explain it.
@AssetslLiabilitiesAndEquity
@AssetslLiabilitiesAndEquity Жыл бұрын
I'm just getting into data science at 42 years. I've taken C programming and received as B.S. in Mathematics back in 2005. I haven't used mathematics professionally. I think learning Python will help me take my skills to another level.
@noblesse2041
@noblesse2041 3 жыл бұрын
Hi CS Dojo: i have a question ❔ what is the benefit of this two functions in the video: def sit_down(self): self.is_sitting=True def stand_up(self): self.is_sitting=False and thank for your time
@imasha7315
@imasha7315 4 жыл бұрын
You’re such a legend thank u so much
@charlene2459
@charlene2459 2 жыл бұрын
Dear CS Dojo, Thank you so much for these. I'm a newcomer in coding, and as an adult, I'm embracing every error I make as an opportunity to learn new things and correct existing faults. I hope to become a computational linguist after my future masters, and I'm determined to get there. Keep up the amazing content
@561Aloha
@561Aloha Жыл бұрын
wishing you the best
@vanochristian7639
@vanochristian7639 5 жыл бұрын
Because of you, now I know to leave four spaces in def and other stuff before I got an error and did not know what to do THX
@christophergjoeen4617
@christophergjoeen4617 6 жыл бұрын
Good job!
@dwaghe2444
@dwaghe2444 4 жыл бұрын
if teacher == CS Dojo: student = 'amazing' else: student = 'average'
@tristanfirepro
@tristanfirepro 3 жыл бұрын
line 1: if teacher == Cs Dojo: ^ SyntaxError: invalid syntax
@dwaghe2444
@dwaghe2444 3 жыл бұрын
It is correct
@dwaghe2444
@dwaghe2444 3 жыл бұрын
In python it is like this only
@tristanfirepro
@tristanfirepro 3 жыл бұрын
@@dwaghe2444 No I think it's because Cs Dojo isn't a valid variable name. Should be Cs_Dojo or something but im just nit picking lmao
@dwaghe2444
@dwaghe2444 3 жыл бұрын
@@tristanfirepro ok, now I understand
@iamnathank
@iamnathank 5 жыл бұрын
Wow! Thank you for such a clear and concise tutorial. All your videos have been incredibly helpful so far. Cheers!
@anytutorialforyou
@anytutorialforyou 6 жыл бұрын
I have been learning so much from you and the androud app SoloLearn! 2 weeks ago I couldn't print "Hello World" to save my life, now I am reading sensors and finding it much easier to actually understand and learn from other's codes. Anything I don't get in SoloLearn, you help me understand in the video, and if I don't understand what you're explaining, SoloLearn has my back! Please never end these types of videos, you are an amazing teacher and obviously have a big heart to leave your job and help others such as myself. Keep on keeping on, I look forward to learning much more from you!!
@sreepadhm9703
@sreepadhm9703 3 жыл бұрын
me.name="Kitty" Down.like.who_watching_this_during_quarantine()
@burlofreak
@burlofreak 5 жыл бұрын
THANK YOU YK I have come so far so quickly with you!
@tokpengeng1818
@tokpengeng1818 3 жыл бұрын
Hi may i know what is the reason of creating method, def sit_down(self):and def stand_up(self):which never been used in your demo?
@chubbydawme
@chubbydawme 3 жыл бұрын
Why does Alice have the aggressive personality though? Should be Becky. Or Karen
@loftyabhi
@loftyabhi 5 жыл бұрын
Hey I have some changes in your code see here👇👇 class Robot: def __init__(self, n, c, w): self.name = n self.color = c self.weight = w def introduce_self(self): print("His Name Is " + self.name) print("His Color Is " + self.color) print("His Weight Is " + self.weight) r1 = Robot ("Tom", "Red", "20") r2 = Robot ("Jerry", "Blue", "20") class Person: def __init__(self, n, p, i): self.name = n self.personality = p self.is_sitting = i def introduce_self(self): print("My Name Is " + self.name) print("My Personality " + self.personality) if self.is_sitting == True: print("I am Sitting") else: print("I am Not Sitting") print("My Robot :") def sit_down(self): self.is_sitting = True def stand_up(self): self.is_sitting = False p1 = Person("Alice", "Aggressive", False) p2 = Person("Abhi", "Talkative", True) p1.robot_owned = r2 p2.robot_owned = r1 #asking questions p1.introduce_self() p1.robot_owned.introduce_self() p2.introduce_self() p2.robot_owned.introduce_self()
@loftyabhi
@loftyabhi 5 жыл бұрын
You Can Download This Code From Here 👇👇👇👇 drive.google.com/file/d/1PVTQKfDHJEUHONSI2kOLqaL-Pb1-IPts/view?usp=drivesdk
@imtiazshahed944
@imtiazshahed944 5 жыл бұрын
Hi Dojo, you are great. I am new to python and would like to know the best site to practice python. Much appreciated.
@abhinavlenkala
@abhinavlenkala 3 жыл бұрын
Use VSCODE or Jupiter Notebook
@doniyorabduvokhidov1862
@doniyorabduvokhidov1862 4 жыл бұрын
You made me happy with day i was always thinking with the idea of why we need __init__(self)
@pradeepkumar-wo7zj
@pradeepkumar-wo7zj 6 жыл бұрын
which software do you use for this interactive black boxes to make us understand these programs??
@poldomenech3843
@poldomenech3843 3 жыл бұрын
I copy exactly the same and it say me Person () takes no arguments What does it mean?
@gqigg
@gqigg 6 жыл бұрын
hey , how to print alice and her status? , you skip that part!
@nitricdx
@nitricdx 4 жыл бұрын
create a function in the class and it to print
@arjunk5959
@arjunk5959 4 жыл бұрын
call the function stand_up to know her status
@simbarashempofu283
@simbarashempofu283 3 жыл бұрын
@@arjunk5959 like how
@rahultirkey7950
@rahultirkey7950 4 жыл бұрын
You just saved my life. You're like an angle who came to help me. Keep making more videos to inspire more people who loves to code but don't know where to start.
@atlantic_love
@atlantic_love 4 жыл бұрын
Is your name Geo Metry, by chance?
@urjitchakraborty5813
@urjitchakraborty5813 4 жыл бұрын
Steven and Kristy LMAO
@jaichenchlani
@jaichenchlani 5 жыл бұрын
Hey YK - your videos are very helpful. What software do you use to create these ( like the whiteboard and drawing and stuff)?
@combatjeyj6234
@combatjeyj6234 4 жыл бұрын
Ma man can explain what my teacher has been trying to teach us in class for the last 3 months in 10 minutes
@honeypatel9283
@honeypatel9283 3 жыл бұрын
" Best tutor ever ❤ ". Thank you
@hasnainakbar8621
@hasnainakbar8621 6 жыл бұрын
Amazing Big Bro Continue
@neevpatel3670
@neevpatel3670 2 жыл бұрын
print(“ Thank you!”)
@w084manavpandya4
@w084manavpandya4 6 жыл бұрын
Can you also teach object inheritance.. please
@roborbiettinoisgone392
@roborbiettinoisgone392 4 жыл бұрын
Thanks_cs_dojo = thanks! Print("hi dojo" + Thanks_cs_dojo)
@Michel-mb7yq
@Michel-mb7yq 4 жыл бұрын
Error! Because first letter of print is capital letter.
@roborbiettinoisgone392
@roborbiettinoisgone392 4 жыл бұрын
@@Michel-mb7yq ah Damn, autocorrect's fault!
@niborj4172
@niborj4172 Жыл бұрын
@@Michel-mb7yq Thanks_cs_dojo = "thanks!" print("hi dojo " + Thanks_cs_dojo)
@Michel-mb7yq
@Michel-mb7yq Жыл бұрын
@@niborj4172 oh yes, 'thanks!' needed to be in string. nice detection.
@patrickemese1858
@patrickemese1858 5 жыл бұрын
Hi YK, i ran exact program of this classes and object - part 2 and is giving me this error: AttributeError Traceback (most recent call last) in ----> 1 p1.robot_owned.introduce_self() AttributeError: 'Robot' object has no attribute 'introduce_self' please, can you help
@jyotirmoyroy8619
@jyotirmoyroy8619 5 жыл бұрын
Hi Patrick, Hope you have already got the solution for the issue. I had the same issue. And I coded in the same way CS has done, portion in a cell . If the issue still persist, the solution is to "run" each cell at a time from top to bottom and issue will get resolved. Thanks JR.
@driftking1145
@driftking1145 3 жыл бұрын
How would I make a robot say "I am robot 1, my owner is _____" after I assign a robot to a person
@krenze1164
@krenze1164 3 жыл бұрын
'print("I am robot one, my owner is "+str(p2.robot_owned)' should do the trick
@lavenarch9570
@lavenarch9570 3 жыл бұрын
I did something similar heres my code: class Robot: def __init__(self, n, c, w, p): # Defining your constructor self.name = n # Defining attributes self.color = c self.weight = str(w) self.person_owned = p def introduce_self(self): # Defining a class function print("My name is " + self.name + ", my owner is " + self.person_owned + ".") # Manipulating your attributes print(" ") class Person: def __init__(self, n, p, i, ro): self.name = n self.personality = p self.is_Sitting = i self.robot_owned = ro def sit_down(self): self.is_Sitting = True def stand_up(self): self.is_Sitting = False def introduce_personality(self): print("My name is " + self.name + ", and I am " + self.personality + " today.") print("The robot I own is named " + self.robot_owned + ".") print(" ") r1.person_owned = p2.name r2.person_owned = p1.name p1.robot_owned = r2 p2.robot_owned = r1 r1 = Robot("Tom", "red", 30, p2.name) r2 = Robot("Jerry", "blue", 40, p1.name) p1 = Person("Alice", "aggressive", False, r2.name) p2 = Person("Becky", "talkative", True, r1.name) r1.introduce_self() r2.introduce_self() p1.introduce_personality() p2.introduce_personality()
@sanyamjain4777
@sanyamjain4777 3 жыл бұрын
Why i can't concatenate str and int together??
@benchung3795
@benchung3795 5 жыл бұрын
why could not you include the is_setting as one of the arguments in the __init__ constructor?
@JakeFosmire
@JakeFosmire 5 жыл бұрын
You absolutely could but it makes more sense that is_sitting would be a method to the class instead of a variable/argument since it can change back and forth using the function/method of sitting down and standing up. The boolean value changes, the variable/arguments don't change.
@benchung3795
@benchung3795 5 жыл бұрын
@@JakeFosmire Thank you!
@jobakhan5046
@jobakhan5046 6 жыл бұрын
p1 = Person("Alice", "aggressive", False) p2 = Person("Becky", "talkative", True) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) in () ----> 1 p1 = Person("Alice", "aggressive", False) 2 p2 = Person("Becky", "talkative", True) TypeError: object() takes no parameters why is not working??????
@adamlunga6809
@adamlunga6809 5 жыл бұрын
class ThankYou: def __init__(self,name): self.name = name def great_work(self): print('Hie ' + self.name.title() + " you are a doing a great work. keep it up") print('Please if you can do the whole python series from start to finish.') n = ThankYou('CS Dojo') n.great_work() Out put: Hie Cs Dojo you are a doing a great work. keep it up Please if you can do the whole python series from start to finish.
@ViratKohli-jj3wj
@ViratKohli-jj3wj 5 жыл бұрын
Too much hard work
@abhisarpatil728
@abhisarpatil728 4 жыл бұрын
Print("Great Videos!! Thank You so much Sir!!!!")
@rolandsproductions4919
@rolandsproductions4919 4 жыл бұрын
I can't access to your free courses, it says I have to pay to watch them
@superzwarriors7894
@superzwarriors7894 4 жыл бұрын
class Robot: def __init__(self, name, color, weight): self.name = name self.color = color self.weight = weight def introduce_self(self): print("my name is " + self.name) r1 = Robot( "Eden", "tan", 56) r1.introduce_self() r2 = Robot("Quinton", "brown", 43) r2.introduce_self() print(r1) print(r2)
@rajeshwarinadar7932
@rajeshwarinadar7932 6 жыл бұрын
I was really Helpful class Robot: def introduce_self(self,name,color,weight): self.n = name self.c=color self.w=weight print('My name is ' + self.n) r1 = Robot() r1.introduce_self("Tom","Red",30) r2 = Robot() r2.introduce_self("Jerry","Blue",40) class Person: def __init__(self,name,personality,isSitting): self.n = name self.p = personality self.isa = isSitting print(name +" "+ personality ) def sit_down(self): isSitting = True def stand_up(self): isSitting = False p1 = Person("Alice","Aggressive",True) p2 = Person("Becky","Talktive",False) p2.robot_Owned = r1 p1.robot_owned= r2 p1.robot_owned.introduce_self() This not working..... The error is......... Alice Aggressive Becky Talktive globals = debugger.run(setup['file'], None, None, is_module) File "C:\Users\Rajeshwari Nadar.S\Downloads\eclipse\eclipse\plugins\org.python.pydev.core_6.3.3.201805051638\pysrc\pydevd.py", line 1055, in run pydev_imports.execfile(file, globals, locals) # execute the script File "C:\Users\Rajeshwari Nadar.S\Downloads\eclipse\eclipse\plugins\org.python.pydev.core_6.3.3.201805051638\pysrc\_pydev_imps\_pydev_execfile.py", line 25, in execfile exec(compile(contents+" ", file, 'exec'), glob, loc) File "C:\Users\Rajeshwari Nadar.S\eclipse-workspace\Program_1\calculator.py", line 130, in p1.robot_owned.introduce_self() TypeError: introduce_self() missing 3 required positional arguments: 'name', 'color', and 'weight' Plzz check it out.....
@isaacparks2583
@isaacparks2583 4 жыл бұрын
Made a bmi calculator using classes to practice. class bmi_inputs: def __init__(self, name, weight, height): self.name = name self.weight = weight self.height = height * 12 def bmi_calculator(self): bmi = self.weight / (self.height **2) * 703 print ('Name: '+ self.name) print ('BMI: ' + str(bmi)) if bmi > 25: print ('Overweight') if bmi >= 18.5 and bmi
@Templar2300
@Templar2300 4 жыл бұрын
This is how i made it. class Robot: def __init__(self, name, color, weight): self.name = name self.color = color self.weight = weight def introduce_self(self): print('My namen is:', self.name) print('My color is:', self.color) print('My weight is:', self.weight) class Person: def __init__(self, name, personality, isSitting, robotOwned): self.name = name self.personality = personality self.isSitting = isSitting self.robotOwned = robotOwned def sit_down(self): if self.isSitting == False: print(self.name, 'is', self.personality, 'person so she stood up she also owns a robot named', self.robotOwned) def stand_up(self): if self.isSitting == True: print(self.name, 'is', self.personality, 'person so she sat down she also owns a robot named', self.robotOwned) #Robot Class r1 = Robot("Tom", "Red", 30) r2 = Robot("Jerry", "Blue", 40) #Person Class p1 = Person("Alice", "Agressive", False, r1.name) p2 = Person("Becky", "Talkative", True, r2.name)
@cybertaopodcast
@cybertaopodcast 6 жыл бұрын
Hi CS Dojo, Please continue with your series of Python, it is really great to learn this programme with you. Can't wait for the next video.
@atlantic_love
@atlantic_love 4 жыл бұрын
If you paid attention, he said said he wasn't. Not in OOP anyway.
@drcrazzy1134
@drcrazzy1134 6 жыл бұрын
class Robot: def __init__(self, b, c, d): self.name=b self.age=c self.height=d def introduce_self(self): print('my name is ' + self.name) x= Robot('Jerry', 34, '1m64') y= Robot('Tom',179, '1m80') class Person: def __init__(self, name, age, status, own): self.name= name self.age= age self.status= status self.own=own def is_standing(): is_sitting= False def is_sitting(): is_sitting= True def own(): print ('I own '+ self.own) person1= Person("Alex",42, True, x) person2= Person('John', 36, False, y) person1.own() The result is ----> 1 person1.own() TypeError: 'Robot' object is not callable Can you guys help me figure out why ? I tried to print out the information of the robot hat person1 owned.
@avestuart
@avestuart 4 жыл бұрын
Hey @CS Dojo - i'm really not understanding the robot_owned attribute, and looking at the comments here i'm not the only one who is confused. Can you please explain this a bit more?
@manoharchandrakasan7187
@manoharchandrakasan7187 4 жыл бұрын
Me too bro
@atlantic_love
@atlantic_love 4 жыл бұрын
@@manoharchandrakasan7187 I think the content creator was hinting at something called "polymorphism" or "inheritance", where an class takes on attributes and/or methods from another class, or adds to them. Just not a good video, but hey, the creator has classes to teach (that have nothing to do with programming) LMAO!!!!
@hafsahsarwar4148
@hafsahsarwar4148 4 жыл бұрын
Hi my name is hafsah. I have a python code and i need help. This is the code i have to fix class Apple: def __init__(self, number_of_seeds: int): self.number_of_seeds = number_of_seeds green_apple = Apple(number_of_seeds=10) red_apple = Apple(number_of_seeds=20) print(f'{green_apple + red_apple}`)
@abdulazizgwei2888
@abdulazizgwei2888 3 жыл бұрын
Sr i have just started following your videos and its really awesome. i really want to know more about this python programing but my own jupyter notebook is not not launching. i have downloaded the Anaconda3-2021.05-Windows-x86_64, i have installed it but i can't get jupyter to launch. please help
@AmanUllah-zz4jh
@AmanUllah-zz4jh Жыл бұрын
I am a University teacher. I wanted to include your course "Introduction to Data Visualization with Python" in our syllabus. But I am unable to find the link to download it with access to full course. I will help us a great deal in deciphering the genetic cause of the diseases in our patients. Moreover, can you please help in this regard and be kind enough to provide that for free to us! We shall be so grateful to you. Best Regards, Asst. Prof. Dr Aman
@biggee1
@biggee1 4 жыл бұрын
Thank you CS Dojo
@akshatsingh6036
@akshatsingh6036 6 жыл бұрын
Sir I just want to know that is graphics.h in c++ should I learn because I am in 12th standard and learning c++ so should I go for graphics or PYTHON. Pls sir make a video in it .and is python will help me more than c++ in getting jobs in MNC's like Google.
@welociraptoruspospolitus7232
@welociraptoruspospolitus7232 6 жыл бұрын
Hey guys I'm desperatly seeking for help. It seems like output cells are not appearing after I run my code. Also next input cells are named " In[*] instead of In[1] In [2] etc... Does any od you know what's the matter??
@simbian4345
@simbian4345 3 жыл бұрын
Hey, im new... I watch your vids... About sit_down and stand_up function, what are purpose of them in there? Thx
@TusharGaurav
@TusharGaurav 4 жыл бұрын
You are my CS teacher!
@namashaggarwal7430
@namashaggarwal7430 6 жыл бұрын
East or West,CS Dojo is the Best
@comprehensivemathsscience1217
@comprehensivemathsscience1217 4 жыл бұрын
learning python from these tutorials .... feeling good
@QAInsights
@QAInsights 5 жыл бұрын
Please let me know what software you use to demonstrate the classes concept? :) Thanks!
@iitnakanpur..
@iitnakanpur.. 5 жыл бұрын
Jupyter notebook
@bxameri
@bxameri 2 жыл бұрын
class Me: def say(self): print("Thank You") me1 = Me.say() print(me1)
@jayatidutta1941
@jayatidutta1941 4 жыл бұрын
Thank you Sir, for your excellent explanation in simple words
@vscs7415
@vscs7415 4 жыл бұрын
Hi cs dojo im having trouble when i print R1.introduce_self() It gives and atribute error but i dont find any mistakes in the code please help
@21family.86
@21family.86 3 жыл бұрын
when i use the constructor and then run for introduce self it tells me that there is an error and that 'Robot' does not take any arguments...anyone help
@ebenezeradu-gyamfi6590
@ebenezeradu-gyamfi6590 3 жыл бұрын
Are you able to share your codes please. I think that will be helpful if anyone want to look into the error. Thanks
@21family.86
@21family.86 3 жыл бұрын
@@ebenezeradu-gyamfi6590 maybe lets communicate at instagram @21_osama
@tonyleung2442
@tonyleung2442 Жыл бұрын
Thanks! 20 mins saves me from doing 1 hour data camp + reading book. LOL
@stupid_tutorial2700
@stupid_tutorial2700 3 жыл бұрын
3.41
@box6853
@box6853 4 жыл бұрын
Does the functions *sit_down* and *stand_up* really work?
@rockguitarist8907
@rockguitarist8907 2 жыл бұрын
Good video, but many of the attributes we created we did not use or discuss further. I’m left learning some things from the beginning of the tutorial, but left with many questions by the end of what to use. We continued to print the same thing from part 1. Kind of odd it left off like that.
@jiakai7254
@jiakai7254 Жыл бұрын
Hi i have a question: can a method (belonging to person class) change the attributes of robot? note to cs dojo: it might be clearer if u say that a robot has an "introduce_self" method rather than function since methods are called on an object, and functions can be called on its own.
@kingfred9
@kingfred9 4 жыл бұрын
_nice_
@tanyabahl9894
@tanyabahl9894 4 жыл бұрын
I don't understand the use of two functions sit_down and stand_up. They are not used anywhere. Could anyone explain. If it's to be put in a if else block, then what could be the condition?
@googleaccount7252
@googleaccount7252 3 жыл бұрын
2 years later I don't know if you still check this but I get an Attribute error 'tuple' object has no attribute 'rbot_owned' when I assign p1 to r1
@satyacharangouda2552
@satyacharangouda2552 6 жыл бұрын
If Yk take a look on this comment: Print("Yk you are great") Print("plzz can you make a video about all the lessons on phython like a map)😀😀😀😀
@vividmusic473
@vividmusic473 5 жыл бұрын
You forgot the inverted commas at the end of your second print string
@alexdanoo2427
@alexdanoo2427 5 жыл бұрын
LMAO @@vividmusic473
@ricetv942
@ricetv942 3 жыл бұрын
console.print("thankyou')
@kittoh_
@kittoh_ 3 жыл бұрын
This is awesome! What software did you use in this presentation?
@poojith87
@poojith87 3 жыл бұрын
What happened to sit_down and Stand_up function outputs? were they simply created?
@Wallderon-Prime
@Wallderon-Prime Ай бұрын
seriously_2_videos = Learned 3_days_school = Wasted me.following_you()
@Wallderon-Prime
@Wallderon-Prime Ай бұрын
But i must ask is it realy better to aad that robot_owned as a function instead of atributte? Isn't it better as atributte with function that do something like p1.use_robot() followed by print message asking user to choose one? (When u count, that functions will be calked from main.py) I gues it can be done vice versa but... it seems more logical to me, also im kinda new to this, so who knows...
@josvandenbrink
@josvandenbrink 2 ай бұрын
It's a pity you don't demonstrate the sitting functions you created. Would be nice to see.
@djkorou
@djkorou 4 жыл бұрын
You really need a Patreon acc with many supporters 🤗 I would support you.
@jarifhossain5577
@jarifhossain5577 2 жыл бұрын
I have tried to print the: p1.introduce_second() but how can you concatenate the bool in this case
@christianjay9898
@christianjay9898 5 жыл бұрын
Hey Cs Dojo your tutorial is full of wonderful stuff, I learned about Object Oriented Programming with python also I can apply this on other Programming language because you taught smooth like professional speaker.
@pannagasudarshan6639
@pannagasudarshan6639 6 жыл бұрын
is ' SELF ' a keyword or just a variable? can I also use "s" instead of "SELF"?
@mosth8ed
@mosth8ed 6 жыл бұрын
You technically *can* use s in place of self, but it is very much standard practice and often frowned upon if you do not use "self".
@srivishalsudharsan1092
@srivishalsudharsan1092 5 жыл бұрын
No, doing that is like saying can I use p instead of print. "self" is built into python, just like the print function.
@Talktech101
@Talktech101 4 жыл бұрын
=Print(Always grateful for you)
@DirtyDooney22
@DirtyDooney22 5 жыл бұрын
how do you memorize every single bit of code you do? I mean obviously you don't just want to memorize the code you want to understand each and everything you do and why you do it but do you ever need to review things or go back and study code?
@DrWho2008t101
@DrWho2008t101 3 жыл бұрын
Thank you for the video, great work. Appreciate your work.
@AGZohaib
@AGZohaib 9 ай бұрын
This isn’t the first time someone called female an object….🤓💀😭
@nikkirufus2245
@nikkirufus2245 4 жыл бұрын
nice and learn but some of the error is coming and I will clear also but some code is different and I will solve it and I am some of interst and some of improving skills
@vaclemor102
@vaclemor102 6 жыл бұрын
i actually just got started learning python today like 2 hours ago and its very easy so far
@Vforvin
@Vforvin 6 жыл бұрын
could you help me please i want learn python also could tell me what are you doing where i start
@swallowedinthesea11
@swallowedinthesea11 6 жыл бұрын
This helped me: doc.lagout.org/programmation/python/Python%20for%20Kids_%20A%20Playful%20Introduction%20to%20Programming%20%5BBriggs%202012-12-22%5D.pdf
@OsadeTOOT
@OsadeTOOT 5 жыл бұрын
i spent hours on understanding the basics, it's important to understand them not just use them
@rahulsriram6295
@rahulsriram6295 5 жыл бұрын
@@Vforvin w3schools is the best mate!
@Vforvin
@Vforvin 5 жыл бұрын
@@rahulsriram6295 Thanks
@kimberlyalaba3730
@kimberlyalaba3730 Жыл бұрын
Thank you!! More exampless of coding plsss
@TheShak64
@TheShak64 5 жыл бұрын
Did you have an ex girl friend called alice :/ im sorry bro
@godusoppe7255
@godusoppe7255 4 жыл бұрын
Hey I have a doubt I didn't understand why to use class coz I m confused in class and functions As in functions to directly we can use attributes n do the function Can u tell how to differ in an function and an class
@xabier1698
@xabier1698 3 жыл бұрын
x=1 while x==0: print("Thank you")
@Saad-hi1zz
@Saad-hi1zz 4 жыл бұрын
You forgot to mention 1 more Data Type at 2:21, They are floats example: 0.12322342, -12.213213123413 etc.
@jeremydelvalle5992
@jeremydelvalle5992 6 жыл бұрын
It seems like this is the final tutorial of the series. Any suggestions as to what exactly I should learn next? I was thinking on jumping into a framework like Django and/or Flask, but I'm not sure if I should start learning that with only the basics shown in these tutorials.
@CSDojo
@CSDojo 6 жыл бұрын
I'd suggest Lynda.com or Pluralsight after this. I'm thinking of starting a new series with Django or Flask soon, too!
@BluespotKneeClinic
@BluespotKneeClinic 9 ай бұрын
You've gave me hope and stopped me from dropping out of university.
@marqwithers
@marqwithers 6 жыл бұрын
Thank you for making these awesome instructional videos. I've learned more here in a just few days than any programming class I've taken previously. Please keep going with this!
@gurmaansidhu8515
@gurmaansidhu8515 3 жыл бұрын
can anyone explain me the last part from 7:47. I got the concept but some confusion in the last code.
@biswajitkumardey1012
@biswajitkumardey1012 4 жыл бұрын
hi! Biswajit here again. I am getting same error again "TypeError Traceback (most recent call last) in ----> 1 p1 = Person("Alice", "aggresive", True) 2 p2 = Person ("Becky", "Talkative", False) TypeError: Person() takes no arguments"
@demonslayer4607
@demonslayer4607 4 жыл бұрын
P1.robot. introduce self ta bujlam na
@GopalSinghR1
@GopalSinghR1 6 жыл бұрын
Awesome explanation
@dannyjack2000
@dannyjack2000 2 жыл бұрын
Weird thing with Pycharm, if I mix strings with integers in my def_init, it throws errors
Using Boolean in Python (Python Tutorial #11)
8:14
CS Dojo
Рет қаралды 304 М.
Python Object Oriented Programming (OOP) - For Beginners
53:06
Tech With Tim
Рет қаралды 3,4 МЛН
小丑妹妹插队被妈妈教训!#小丑#路飞#家庭#搞笑
00:12
家庭搞笑日记
Рет қаралды 38 МЛН
The selfish The Joker was taught a lesson by Officer Rabbit. #funny #supersiblings
00:12
Which One Is The Best - From Small To Giant #katebrush #shorts
00:17
Classes and Objects with Python - Part 1 (Python Tutorial #9)
11:36
Functions vs Classes: When to Use Which and Why?
10:49
ArjanCodes
Рет қаралды 157 М.
Learn Python OOP in under 20 Minutes
18:32
Indently
Рет қаралды 40 М.
Introduction to For Loops in Python (Python Tutorial #5)
10:22
CS Dojo
Рет қаралды 1,6 МЛН
Python OOP Tutorial 1: Classes and Instances
15:24
Corey Schafer
Рет қаралды 4,5 МЛН
Python OOP Tutorial 4: Inheritance - Creating Subclasses
19:40
Corey Schafer
Рет қаралды 1,3 МЛН