- Видео 778
- Просмотров 100 084 161
Bro Code
США
Добавлен 10 окт 2019
Coding bootcamps hate him!
See how he can teach you to code with this one weird trick...
This channel is dedicated to providing free education to those that can't afford college, bootcamps, and whatever crap coding gurus try to sell you.
Subscribe to support free education! 👊🔔
See how he can teach you to code with this one weird trick...
This channel is dedicated to providing free education to those that can't afford college, bootcamps, and whatever crap coding gurus try to sell you.
Subscribe to support free education! 👊🔔
Learn Python DUCK TYPING in 4 minutes! 🦆
# "Duck typing" = Another way to achieve polymorphism besides Inheritance
# Object must have the minimum necessary attributes/methods
# "If it looks like a duck and quacks like a duck, it must be a duck."
class Animal:
alive = True
class Dog(Animal):
def speak(self):
print("WOOF!")
class Cat(Animal):
def speak(self):
print("MEOW!")
class Car:
alive = True
def speak(self):
print("HONK!")
animals = [Dog(), Cat(), Car()]
for animal in animals:
animal.speak()
print(animal.alive)
# Object must have the minimum necessary attributes/methods
# "If it looks like a duck and quacks like a duck, it must be a duck."
class Animal:
alive = True
class Dog(Animal):
def speak(self):
print("WOOF!")
class Cat(Animal):
def speak(self):
print("MEOW!")
class Car:
alive = True
def speak(self):
print("HONK!")
animals = [Dog(), Cat(), Car()]
for animal in animals:
animal.speak()
print(animal.alive)
Просмотров: 1 923
Видео
Learn Python POLYMORPHISM in 8 minutes! 🎭
Просмотров 2,7 тыс.12 часов назад
# Polymorphism = Greek word that means to "have many forms or faces" # Poly = Many # Morphe = Form # TWO WAYS TO ACHIEVE POLYMORPHISM # 1. Inheritance = An object could be treated of the same type as a parent class # 2. "Duck typing" = Object must have necessary attributes/methods from abc import ABC, abstractmethod class Shape(ABC): @abstractmethod def area(self): pass class Circle(Shape): def...
Learn Python NESTED CLASSES in 9 minutes! 📛
Просмотров 1,8 тыс.17 часов назад
# Nested class = A class defined within another class # class Outer: # class Inner: # Benefits: Allows you to logically group classes that are closely related # Encapsulates private details that aren't relevant outside of the outer class # Keeps the namespace clean; reduces the possibility of naming conflicts class Company: class Employee: def init (self, name, position): self.name = name self....
Learn Python COMPOSITION in 7 minutes! 🚘
Просмотров 2,8 тыс.22 часа назад
# Aggregation = A relationship where one object contains references to other INDEPENDENT objects # "has-a" relationship # Composition = The composed object directly owns its components, which cannot exist independently # "owns-a" relationship class Engine: def init (self, horse_power): self.horse_power = horse_power class Wheel: def init (self, size): self.size = size class Car: def init (self,...
Learn Python AGGREGATION in 6 minutes! 📚
Просмотров 2,4 тыс.День назад
# Aggregation = Represents a relationship where one object (the whole) # contains references to one or more INDEPENDENT objects (the parts) class Library: def init (self, name): self.name = name self.books = [] def add_book(self, book): self.books.append(book) def list_books(self): return [f"{book.title} by {book.author}" for book in self.books] class Book: def init (self, title, author): self....
Learn Python @property in 7 minutes! ⚙️
Просмотров 2,5 тыс.День назад
# @property = Decorator used to define a method as a property (it can be accessed like an attribute) # Benefit: Add additional logic when read, write, or delete attributes # Gives you getter, setter, and deleter method 00:00:00 getter 00:03:43 setter 00:05:53 deleter #python #pythonprogramming #pythontutorial
Learn Python ABSTRACT CLASSES in 7 minutes! 👻
Просмотров 2,5 тыс.День назад
# Abstract class: A class that cannot be instantiated on its own; Meant to be subclassed. # They can contain abstract methods, which are declared but have no implementation. # Abstract classes benefits: # 1. Prevents instantiation of the class itself # 2. Requires children to use inherited abstract methods from abc import ABC, abstractmethod class Vehicle(ABC): @abstractmethod def go(self): pas...
How to measure execution time in Python ⌚
Просмотров 1,5 тыс.День назад
# HOW TO MEASURE EXECUTION TIME IN PYTHON import time start_time = time.perf_counter() # YOUR CODE GOES HERE end_time = time.perf_counter() elapsed_time = end_time - start_time print(f"Elapsed time: {elapsed_time:.1f} seconds")
Let's code a beginner's Python SLOT MACHINE 🎰
Просмотров 14 тыс.21 день назад
#python #tutorial #programming This is a beginner's project to help you understand functions, loops, and list comprehensions in Python.
Learn Python list comprehensions 📃
Просмотров 3,3 тыс.21 день назад
# List comprehension = A concise way to create lists in Python # Compact and easier to read than traditional loops # [expression for value in iterable if condition] doubles = [x * 2 for x in range(1, 11)] triples = [y * 3 for y in range(1, 11)] squares = [z * z for z in range(1, 11)] fruits = ["apple", "orange", "banana", "coconut"] uppercase_words = [fruit.upper() for fruit in fruits] fruit_ch...
Let's code a beginner's Python BANK PROGRAM 💰
Просмотров 64 тыс.21 день назад
#python #pythonprogramming #pythontutorial This is an exercise do help us learn about functions in Python. Code for this program is pinned in the comments section down below.
if __name__ == '__main__' for Python beginners 📥
Просмотров 6 тыс.28 дней назад
# if name main : (this script can be imported OR run standalone) # Functions and classes in this module can be reused without the main block of code executing # Good practice (code is modular, helps readability, leaves no global variables, avoids unintended execution) Ex. library = Import library for functionality. When running library directly, display a help page. # script1.py # This file can...
Learn Python CONDITIONAL EXPRESSIONS in 5 minutes! ❓
Просмотров 4,8 тыс.Месяц назад
# conditional expression = A one-line shortcut for the if-else statement (ternary operator) # Print or assign one of two values based on a condition # X if condition else Y
SUPER() in Python explained! 🔴
Просмотров 2,9 тыс.Месяц назад
# super() = Function used in a child class to call methods from a parent class (superclass). # Allows you to extend the functionality of the inherited methods class Shape: def init (self, color, is_filled): self.color = color self.is_filled = is_filled def describe(self): print(f"It is {self.color} and {'filled' if self.is_filled else 'not filled'}") class Circle(Shape): def init (self, color, ...
Python INHERITANCE in 6 minutes! 👨👦👦
Просмотров 1,9 тыс.Месяц назад
# Inheritance = Inherit attributes and methods from another class # Helps with code reusability and extensibility # class Child(Parent) class Animal: def init (self, name): self.name = name self.is_alive = True def eat(self): print(f"{self.name} is eating") def sleep(self): print(f"{self.name} is asleep") class Dog(Animal): def speak(self): print("WOOF!") class Cat(Animal): def speak(self): pri...
Python multiple inheritance is easy! 🐟
Просмотров 1,6 тыс.Месяц назад
Python multiple inheritance is easy! 🐟
Python CLASS VARIABLES explained easy! 🏫
Просмотров 3,2 тыс.Месяц назад
Python CLASS VARIABLES explained easy! 🏫
Learn Python Object Oriented Programming! 🚗
Просмотров 9 тыс.Месяц назад
Learn Python Object Oriented Programming! 🚗
C++ GETTERS & SETTERS explained easy 🔒
Просмотров 6 тыс.Месяц назад
C GETTERS & SETTERS explained easy 🔒
C++ CONSTRUCTOR OVERLOADING explained easy 👨🍳
Просмотров 5 тыс.Месяц назад
C CONSTRUCTOR OVERLOADING explained easy 👨🍳
C++ CLASSES & OBJECTS explained easy 🧍
Просмотров 10 тыс.Месяц назад
C CLASSES & OBJECTS explained easy 🧍
C++ structs as arguments explained 🚚
Просмотров 4,7 тыс.Месяц назад
C structs as arguments explained 🚚
this is a random comment! and aaammm yes, this is a great video and serious keep it up!
Bro i really need Angular Framework bro help
I'm a native spanish speaker, so this is gonna be a little dificult for me. But I'm gonna do my best! Day 1: 18:24 (I don't go too far cause I need to finish some work)
Yes you are gigachad of reactjs thank you sir 🙏🙏
Great tutorial. Now I am familiar with react. Thank you!
I understood nothing, and after watching this mans video it all makes sense
<3
Nice 👍 please explain how to use lambda inside a function Sir
sit back relax and enjoy the show
// DAY 2 done
Clear and concise. Love it. Especially the part about the telephones. Brilliant! Thanks!
57:18 Don't worry, you're not wrong :)
sharp.
This is really the best channel, thank you Bro!
Thank you for those example codes. Those really help with understanding the concept in-and-out of the box.
do the positions also work with pictures ?
if I choose the pivot at the begining where do i put my j and i?
GOAT Video of HashTable
Good bro it's working properly.....
today i have finished final keyword in java. before starting OOP, do you suggest me to write down some programs ?
1:53:45
1:43:14
The only OOPs tutorial which actually makes sense.
can you share the nulear codes with me ...?
Great breakdown, thanks bro.
bro is the chad
Very good
yo the second example caught me off guard
all your videos are really great Brev. really cool :0 it helps me to learn java again with interest.
nah if you find what you are looking for in code bro's channel, congrats.
Before watching this video, I was a little bit scared about learning MongoDB, even though I know SQL. I wasn't interested in learning it and couldn't find good resources. However, this video made learning MongoDB easy. Thank you very much, sir!
Is color not a class variable ?
I wish I got his video before the other bullshit RUclips channel who sound like they wanna die
eeee
THANKS
Not gonna lie I chose this c++ course because it said bro code. And anything for the boys!
Excellent
How do you put a color for one part of the website than a different color for another part of the website?
Day1: 1:01:55
Helping you help me. Thanks!
Everything is so easy and understandable with you bro , Thank you very very much 💕
Whenever I watch your videos I never skip ads
What is name softwarw you used
Excellent ❤❤❤
Yo bro big fan from India i am watching ur basic c++ complete tutorial which u uploaded 2 yrs back its a gem i am learning so much for free i also learnt java gui from you thanks a ton bro
Thanks dude
Derived -- Aubro - declared independence -- You will -- cause disease - eat other id!
Aubro -- Declared -- frozen riadim officer - nazi! And he be, simulated -- by device net! Program = clinic only -- in any situate!
/krch P''px || jcn Wn ml~2''x(tTdx'')=tmp array parm z'' < i.e. loch paavlow fr netpachs/ /< + ext thrm mrk loch Wn ml < run tun parmz hlf in 4''tTd(x''(DvF''orb 2''x x 4''xP''px < jcn)/ /krch hlf thrm lyr [rul Wn ml px : < px=jcn ext hlf < 4''tTd abv paavlow < ech vd LN'' array]/ /insrt~2''x@ IC mol < ext mrks array < 24"vF(vd LN''(txz'')Tech || loch Wn ml tun < run rul/
random comment