Python OOP in 10 Minutes 🐍

Quickly learn Python's Object-Oriented Programming with examples in just 10 minutes. #python #OOP

Python OOP in 10 Minutes 🐍
Bro Code
578.1K views • Dec 28, 2020
Python OOP in 10 Minutes 🐍

About this video

python object oriented programming OOP tutorial example explained

#python #objects #OOP

#------------------------------------------------------------------
from car import Car

car_1 = Car("Chevy","Corvette",2021,"blue")
car_2 = Car("Ford","Mustang",2022,"red")

car_1.drive()
car_2.stop()
#------------------------------------------------------------------
class Car:

def __init__(self,make,model,year,color):
self.make = make
self.model = model
self.year = year
self.color = color

def drive(self):
print("This "+self.model+" is driving")

def stop(self):
print("This "+self.model+" is stopped")
#------------------------------------------------------------------

music credits 🎼 :
===========================================================
Up In My Jam (All Of A Sudden) by - Kubbi https://soundcloud.com/kubbi
Creative Commons — Attribution-ShareAlike 3.0 Unported— CC BY-SA 3.0
Free Download / Stream: http://bit.ly/2JnDfCE
Music promoted by Audio Library https://youtu.be/tDexBj46oNI
===========================================================

Tags and Topics

Browse our collection to discover more content in these categories.

Video Information

Views

578.1K

Likes

30.8K

Duration

10:04

Published

Dec 28, 2020

User Reviews

4.8
(115)
Rate:

Related Trending Topics

LIVE TRENDS

Related trending topics. Click any trend to explore more videos.