Learn Python Object Oriented Programming! 🚗

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

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()
--------------------------------------

Пікірлер: 66
@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.
@monoq_
@monoq_ 2 ай бұрын
You are back! Its a good day today.
@myJapanTV013
@myJapanTV013 Ай бұрын
Nicely explained ❤
@kazi_goni
@kazi_goni 25 күн бұрын
Love the way you teach...
@jimsvolt
@jimsvolt 2 ай бұрын
You are an absolutely gold gem❤
@Abinav777
@Abinav777 2 ай бұрын
Thank you so much bro❤
@ChrisKoledrianos
@ChrisKoledrianos 2 ай бұрын
nice
@Zero-Dev64
@Zero-Dev64 2 ай бұрын
Thank you bro ❤
@celshante1769
@celshante1769 2 ай бұрын
i thought this was a random meme video but instead itsa blessing of Bro xD nice
@rishusingh1995
@rishusingh1995 2 ай бұрын
nice. video sir
@JEEVISAKTHI-pe8hr
@JEEVISAKTHI-pe8hr 2 ай бұрын
Bro one like for your fellow bro
@phillipkantunda1632
@phillipkantunda1632 2 ай бұрын
Thank you so much for this , can we have questions like homework for every lesson?
@perfektyoutube9757
@perfektyoutube9757 Ай бұрын
Thanks for the video and your help
@luisladino6162
@luisladino6162 Ай бұрын
Thanks bro
@Siteit.company
@Siteit.company 2 ай бұрын
amazing tutorials
@nixgen7781
@nixgen7781 2 ай бұрын
best guy
@nobeltnium
@nobeltnium Ай бұрын
subbed!
@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
@afgfuturetube
@afgfuturetube 2 ай бұрын
Thanks alot would you explaining the difference of software engineer and software developer and programmer
@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
@zom4275
@zom4275 2 ай бұрын
Hi bro code can u upload a full course of cyber security? Please
@aashishkandel197
@aashishkandel197 2 ай бұрын
Add these videos to your python paylist bro. It'll be easier for me to watch them all
@wolftube5793
@wolftube5793 Ай бұрын
Even though I am not interested ın Python but I found myself clicking on the video bcz of the title🗿
@Greenbay-bn3yk
@Greenbay-bn3yk 2 ай бұрын
Please bro, We want a tutorial : Algorithms and Data Structures using Python
@realm9007
@realm9007 2 ай бұрын
me too
@shreehari2589
@shreehari2589 2 ай бұрын
Thanks for teaching us about the Poop
@kedarppopuri2776
@kedarppopuri2776 2 ай бұрын
Bro please make videos for python socket programming please
@throwyourmindat
@throwyourmindat Ай бұрын
Funny video banner 😂
@tioalex-px
@tioalex-px 2 ай бұрын
TypeScript please!!! And NodeJS & ExpressJS
@user-sh3zt5nl7f
@user-sh3zt5nl7f 2 ай бұрын
Can you do raylib?
@illmatic_2
@illmatic_2 2 ай бұрын
Can you create an android tutorial?
@PoPo-jg9nt
@PoPo-jg9nt 2 ай бұрын
Next.js tutorial Bro ?
@shorty4174
@shorty4174 2 ай бұрын
Bro put a picture of his room
@PetrusKaua
@PetrusKaua Ай бұрын
que editor de códigos é esse?
@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...
@liege4958
@liege4958 Ай бұрын
Asmangold streaming 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.
@user-fw3vs7tm1v
@user-fw3vs7tm1v Ай бұрын
easyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
@RakibHasan-hs1me
@RakibHasan-hs1me 2 ай бұрын
U can't use OOP?
@user-fw3vs7tm1v
@user-fw3vs7tm1v Ай бұрын
thats OOP. there is more in it. its just beginning.
@Sav2Swindle
@Sav2Swindle Ай бұрын
pls type hinting 4 python
@navtektv
@navtektv 21 күн бұрын
I can definitely poop in 12 minutes.
@C4ManMike
@C4ManMike 2 ай бұрын
Lol a shot of asmongolds beadroom
@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
@pyroclastic8924
@pyroclastic8924 2 ай бұрын
everyone remember to thank brocode for showing us his poop
@bim282
@bim282 2 ай бұрын
POOP 💀💀
Python CLASS VARIABLES explained easy! 🎓
8:16
Bro Code
Рет қаралды 5 М.
Let's code a HANGMAN GAME in Python! 🕺
25:07
Bro Code
Рет қаралды 4,8 М.
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 10 МЛН
Best Toilet Gadgets and #Hacks you must try!!💩💩
00:49
Poly Holy Yow
Рет қаралды 19 МЛН
ЧУТЬ НЕ УТОНУЛ #shorts
00:27
Паша Осадчий
Рет қаралды 10 МЛН
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 М.
Object-Oriented Programming, lecture by Daniel Ingalls
45:37
Computer History Museum
Рет қаралды 23 М.
Object Oriented Programming (OOP) in Python
46:37
Traversy Media
Рет қаралды 278 М.
This is Why Programming Is Hard For you
10:48
The Coding Sloth
Рет қаралды 730 М.
All 39 Python Keywords Explained
34:08
Indently
Рет қаралды 143 М.
Functions vs Classes: When to Use Which and Why?
10:49
ArjanCodes
Рет қаралды 149 М.
The 3 Laws of Writing Readable Code
5:28
Kantan Coding
Рет қаралды 436 М.
Object Oriented Programming - The Four Pillars of OOP
11:23
Keep On Coding
Рет қаралды 323 М.
КАК ДУМАЕТЕ КТО ВЫЙГРАЕТ😂
00:29
МЯТНАЯ ФАНТА
Рет қаралды 10 МЛН