No video

Learn Python Object Oriented Programming! 🚗

  Рет қаралды 14,590

Bro Code

Bro Code

Күн бұрын

#python #pythonprogramming #pythontutorial
00:00:00 introduction
00:01:53 classes
00:02:19 constructors
00:04:13 instantiate objects
00:05:06 attribute access operator
00:06:09 multiple objects
00:07:19 modules
00:08:21 methods
00:11:52 conclusion
object = A "bundle" of related attributes (variables) and methods (functions)
Ex. phone, cup, book
You need a "class" to create many objects
class = (blueprint) used to design the structure and layout of an object
-------------- car.py --------------
class Car:
def __init__(self, model, year, color, for_sale):
self.model = model
self.year = year
self.color = color
self.for_sale = for_sale
def drive(self):
print("You drive the car")
print(f"You drive the {self.model}")
print(f"You drive the {self.color} {self.model}")
def stop(self):
print("You stop the car")
print(f"You stop the {self.model}")
print(f"You stop the {self.color} {self.model}")
def describe(self):
print(f"{self.year} {self.color} {self.model}")
--------------------------------------
-------------- main.py --------------
from car import Car
car1 = Car("Mustang", 2024, "red", False)
car2 = Car("Corvette", 2025, "blue", True)
car3 = Car("Charger", 2026, "yellow", True)
print(car1.model)
print(car1.year)
print(car1.color)
print(car1.for_sale)
car1.drive()
car1.stop()
car3.describe()
--------------------------------------

Пікірлер: 67
@BroCodez
@BroCodez 2 ай бұрын
# --------------- car.py --------------- class Car: def __init__(self, model, year, color, for_sale): self.model = model self.year = year self.color = color self.for_sale = for_sale def drive(self): # print("You drive the car") # print(f"You drive the {self.model}") print(f"You drive the {self.color} {self.model}") def stop(self): # print("You stop the car") # print(f"You stop the {self.model}") print(f"You stop the {self.color} {self.model}") def describe(self): print(f"{self.year} {self.color} {self.model}") # -------------------------------------- # --------------- main.py --------------- from car import Car car1 = Car("Mustang", 2024, "red", False) car2 = Car("Corvette", 2025, "blue", True) car3 = Car("Charger", 2026, "yellow", True) print(car1.model) print(car1.year) print(car1.color) print(car1.for_sale) car1.drive() car1.stop() car3.describe() # --------------------------------------
@beamboy07
@beamboy07 Ай бұрын
i luv u
@UznKe
@UznKe 2 ай бұрын
i always wanted to learn more bout poop. thank u so much. ❤️
@llowotv
@llowotv 2 ай бұрын
i mean keep learning urself, ur icon is poop, not the acronym
@UznKe
@UznKe 2 ай бұрын
@@llowotv tf?
@p11
@p11 2 ай бұрын
@@UznKe that guy is schizo dont worry about him
@ninjacocovi
@ninjacocovi 2 ай бұрын
⁠​⁠@@llowotvyou don’t get that poop is the acronym of Python Object Oriented Programming?
@BroCodez
@BroCodez 2 ай бұрын
I'm glad I could help you with your poop
@SabonaMarara
@SabonaMarara 2 ай бұрын
i like your video always thanks sir
@IGCSENERD-up6yv
@IGCSENERD-up6yv 2 ай бұрын
I want you to comprehend the amount of times I was getting confused before this man came to the scene, I am very grateful of this man and his channel!
@PratikMoharana701
@PratikMoharana701 2 ай бұрын
Thanks for uploading. Never stop uploading because we will really miss you. You changed so many lives. I'm always eager to see more of you, no matter whatever the course is. Cover as many languages and frameworks you can. Good luck.👍😃
@saaransh01
@saaransh01 29 күн бұрын
Awesome and simplified explanation....
@user-vc3md3sq2e
@user-vc3md3sq2e Ай бұрын
Thank u so much for this amazing content 🎉
@i_help_strangers
@i_help_strangers 2 ай бұрын
Aww man the title got me dying 😂
@mohamedcoufi9873
@mohamedcoufi9873 Ай бұрын
I hit like even befor I watch the video😊.. Thanks a bunch.
@jimsvolt
@jimsvolt 2 ай бұрын
You are an absolutely gold gem❤
@kazi_goni
@kazi_goni 25 күн бұрын
Love the way you teach...
@Abinav777
@Abinav777 2 ай бұрын
Thank you so much bro❤
@monoq_
@monoq_ 2 ай бұрын
You are back! Its a good day today.
@myJapanTV013
@myJapanTV013 Ай бұрын
Nicely explained ❤
@celshante1769
@celshante1769 2 ай бұрын
i thought this was a random meme video but instead itsa blessing of Bro xD nice
@Zero-Dev64
@Zero-Dev64 2 ай бұрын
Thank you bro ❤
@JEEVISAKTHI-pe8hr
@JEEVISAKTHI-pe8hr 2 ай бұрын
Bro one like for your fellow bro
@nobeltnium
@nobeltnium Ай бұрын
subbed!
@ChrisKoledrianos
@ChrisKoledrianos 2 ай бұрын
nice
@rishusingh1995
@rishusingh1995 2 ай бұрын
nice. video sir
@nixgen7781
@nixgen7781 2 ай бұрын
best guy
@CompraMais4
@CompraMais4 2 ай бұрын
I was just watching my teacher teach this and thought it was too hard and I should watch Bro Code teach it. For my surprise, its only been 6 hours. I'll edit how well I learned this after I watched it. Edit: It was way easier than it initially looked like. Bro Code teaching rly well as always
@perfektyoutube9757
@perfektyoutube9757 Ай бұрын
Thanks for the video and your help
@luisladino6162
@luisladino6162 Ай бұрын
Thanks bro
@afgfuturetube
@afgfuturetube 2 ай бұрын
Thanks alot would you explaining the difference of software engineer and software developer and programmer
@phillipkantunda1632
@phillipkantunda1632 2 ай бұрын
Thank you so much for this , can we have questions like homework for every lesson?
@Siteit.company
@Siteit.company 2 ай бұрын
amazing tutorials
@wolftube5793
@wolftube5793 Ай бұрын
Even though I am not interested ın Python but I found myself clicking on the video bcz of the title🗿
@vallunacoder.wecodetogether
@vallunacoder.wecodetogether 2 ай бұрын
I''m not learning python but I really loved your videos. I just did the html one and the Javascript one! I was wondering which one should I do next ?? SHOULD I learn read ?? or Java or should I learn about data bases ? I WOULD love to hear your advice! Greeting from Colombia!
@SamahRizwana
@SamahRizwana Ай бұрын
You should try out CSS
@shreehari2589
@shreehari2589 2 ай бұрын
Thanks for teaching us about the Poop
@aashishkandel197
@aashishkandel197 2 ай бұрын
Add these videos to your python paylist bro. It'll be easier for me to watch them all
@zom4275
@zom4275 2 ай бұрын
Hi bro code can u upload a full course of cyber security? Please
@throwyourmindat
@throwyourmindat Ай бұрын
Funny video banner 😂
@tioalex-px
@tioalex-px 2 ай бұрын
TypeScript please!!! And NodeJS & ExpressJS
@kedarppopuri2776
@kedarppopuri2776 2 ай бұрын
Bro please make videos for python socket programming please
@Greenbay-bn3yk
@Greenbay-bn3yk 2 ай бұрын
Please bro, We want a tutorial : Algorithms and Data Structures using Python
@realm9007
@realm9007 2 ай бұрын
me too
@juststig2735
@juststig2735 2 сағат бұрын
I can understand with the title why people wont use this instead of json
@user-sh3zt5nl7f
@user-sh3zt5nl7f 2 ай бұрын
Can you do raylib?
@PetrusKaua
@PetrusKaua Ай бұрын
que editor de códigos é esse?
@illmatic_2
@illmatic_2 2 ай бұрын
Can you create an android tutorial?
@PoPo-jg9nt
@PoPo-jg9nt 2 ай бұрын
Next.js tutorial Bro ?
@user-fw3vs7tm1v
@user-fw3vs7tm1v Ай бұрын
easyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
@Sav2Swindle
@Sav2Swindle Ай бұрын
pls type hinting 4 python
@samtheking5759
@samtheking5759 12 күн бұрын
thank you, with this video i learnt how to shit- UHH I MEAN i learnt how to use objects and classes... yeah...
@shorty4174
@shorty4174 2 ай бұрын
Bro put a picture of his room
@Dex-uq8ff
@Dex-uq8ff 2 ай бұрын
One day programming is going to be taken over by Ai and coding would be useless by then... but learning them is great for own use.
@liege4958
@liege4958 Ай бұрын
Asmangold streaming room 😂
@intotheuniverse9170
@intotheuniverse9170 2 ай бұрын
hi
@elcapitanodeltimbuktu1O1sir
@elcapitanodeltimbuktu1O1sir 2 ай бұрын
Some People Say Python is Shit Language😂 But For Now Python Saved By Ai 😂 Btw If Newbie Don't Know What Is SELF "self" is same as "this" In Js,java But In Js & Java You Don't Need To Pass Keyword "this" To Identify Its Object
@RakibHasan-hs1me
@RakibHasan-hs1me 2 ай бұрын
U can't use OOP?
@user-fw3vs7tm1v
@user-fw3vs7tm1v Ай бұрын
thats OOP. there is more in it. its just beginning.
@C4ManMike
@C4ManMike 2 ай бұрын
Lol a shot of asmongolds beadroom
@navtektv
@navtektv 21 күн бұрын
I can definitely poop in 12 minutes.
@pyroclastic8924
@pyroclastic8924 2 ай бұрын
everyone remember to thank brocode for showing us his poop
@bim282
@bim282 2 ай бұрын
POOP 💀💀
Let's code a HANGMAN GAME in Python! 🕺
25:07
Bro Code
Рет қаралды 4,8 М.
Python CLASS VARIABLES explained easy! 🎓
8:16
Bro Code
Рет қаралды 5 М.
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 37 МЛН
Задержи дыхание дольше всех!
00:42
Аришнев
Рет қаралды 3,6 МЛН
Python Object Oriented Programming (OOP) - For Beginners
53:06
Tech With Tim
Рет қаралды 3,3 МЛН
5 Good Python Habits
17:35
Indently
Рет қаралды 460 М.
Python lists, sets, and tuples explained 🍍
15:06
Bro Code
Рет қаралды 251 М.
Please Master These 10 Python Functions…
22:17
Tech With Tim
Рет қаралды 105 М.
All 39 Python Keywords Explained
34:08
Indently
Рет қаралды 143 М.
Object Oriented Programming (OOP) in Python
46:37
Traversy Media
Рет қаралды 278 М.
Object Oriented Programming - The Four Pillars of OOP
11:23
Keep On Coding
Рет қаралды 323 М.
This is Why Programming Is Hard For you
10:48
The Coding Sloth
Рет қаралды 730 М.
5 Tips For Object-Oriented Programming Done Well - In Python
16:08
Let's code a beginner's Python BANK PROGRAM 💰
15:01
Bro Code
Рет қаралды 123 М.
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 37 МЛН