<jupyter_start><jupyter_text>Classes with multiple Object<jupyter_code>class Birds:
  def __init__(self,birds_name):
    self.birds_name = birds_name
  def flying_birds(self):
    print(f"{self.birds_name} flies above the sky")
  def non_flying_birds(self):
    print(f"{self.birds_name} is the national bird of Australia")
  
vulture = Birds("Griffon Vulture")
crane = Birds("Common Crane")
emu = Birds("Emu")

vulture.flying_birds()
crane.flying_birds()
emu.non_flying_birds()<jupyter_output>Griffon Vulture flies above the sky
Common Crane flies above the sky
Emu is the national bird of Australia<jupyter_text>Encapsulation (mangling with double underscore)<jupyter_code>class foo:
  def __init__(self, a,b):
    self.__a = a    
    self.__b = b
  def add(self):
    return self.__a + self.__b
foo_object = foo(3,4)
foo_object.add()

foo_object.__a = 6
foo_object.add()
class Counter:
  def __init__(self):
    self.__current = 0
  def increment(self):
    self.__current +=1
  def value(self):
    return self.__current
  def reset(self):
    self.__current = 0

num = Counter()
num.increment()
num.increment()
num.__current = 5

print(num.value())<jupyter_output>2<jupyter_text>Inheritance<jupyter_code>class Person:
  def __init__(self,firstname,surname):
    self.firstname = firstname
    self.surname = surname
  def fullname(self):
    print(self.firstname,self.surname)

person = Person("Rhonan", "Bangay")
person.fullname()

class Student(Person):
  pass

person2 = Student("Richmond", "Bangay")
person2.fullname()<jupyter_output><NAME>
<NAME><jupyter_text>Polymorphism<jupyter_code>class RegularPolygon:
  def __init__(self,side):
    self.side = side
class Square(RegularPolygon):
  def area(self):
    return self.side * self.side
class EquilateralTriangle(RegularPolygon):
  def area(self):
    return self.side * self.side * 0.433

obj1 = Square(4)
print(obj1.area())

obj2 = EquilateralTriangle(3)
print(obj2.area())<jupyter_output>16
3.897
{'fraction_non_alphanumeric': 0.11989795918367346, 'fraction_numerical': 0.013265306122448979, 'mean_word_length': 5.128125, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '29130', 'license': 'Apache-2.0', 'n_tokens_mistral': 742, 'n_tokens_neox': 704, 'n_words': 151, 'path': 'OOP_Concept_2.ipynb', 'repo_name': 'Rhonan2/OOP-1-1', 'size': '1976'}