<jupyter_start><jupyter_text>Classes with Multiple Objects```<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

object_foo= foo(3,4)
object_foo.add()
#Example 2
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

number = Counter()
number.__current = 1

number = Counter()
number.increment()
number.increment()
number.increment()


print (number.value())<jupyter_output>3<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 ("<NAME>", "Eugenio")
person.fullname()

class Student(Person):
  pass

person2 = Student("<NAME>", "Eugenio")
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<jupyter_text>Application 1 1. Create a Python program that displays the name of three students (Student 1, Student 2, and Student 3) and their term grades2. Create a class name Person and attributes - std1, std2, std2, pre, mid,fin3. Compute the average of eatch term grade using Grade() method4. Information about student's grades must be hidden from others<jupyter_code>class Person:
  def __init__(self,std1, std2, std3, pre, mid, fin):
    self.__std1 = std1
    self.__std2 = std2
    self.__std3 = std3
    self.__pre = pre
    self.__mid = mid
    self.__fin = fin
  
  def Student1(self):
    print ("\n" + self.__std1)
    print ("Prelims Grade:", self.__pre)
    print ("Mid Terms Grade:", self.__mid)
    print ("Final Grade:", self.__fin)

  def Student2(self):
    print ("\n"+ self.__std2)
    print ("Prelims Grade:", self.__pre)
    print ("Mid Terms Grade:",  self.__mid)
    print ("Final Grade: ",  self.__fin)

  def Student3(self):
    print ("\n"+ self.__std3)
    print ("Prelims Grade:",  self.__pre)
    print ("Mid Terms Grade:", self.__mid)
    print ("Final Grade:", self.__fin)


  def Grade1(self): 
    return (self.__pre + self.__mid + self.__fin)/3
  
  def Grade2(self): 
    return (self.__pre + self.__mid + self.__fin)/3
  
  def Grade3(self): 
    return (self.__pre + self.__mid + self.__fin)/3


  
Estudyante1 = Person ("Student 1", "-", "-", 70,75,80)
Estudyante1.Student1()
print(Estudyante1.Grade1())

Estudyante2 = Person ("-", "Student 2", "-", 80,85,90)
Estudyante2.Student2()
print(Estudyante2.Grade2())

Estudyante3 = Person ("-", "-", "Student3", 90,95,100)
Estudyante3.Student3()
print(Estudyante3.Grade3())<jupyter_output>Student 1
Prelims Grade: 70
Mid Terms Grade: 75
Final Grade: 80
75.0

Student 2
Prelims Grade: 80
Mid Terms Grade: 85
Final Grade:  90
85.0

Student3
Prelims Grade: 90
Mid Terms Grade: 95
Final Grade: 100
95.0
{'fraction_non_alphanumeric': 0.1287741935483871, 'fraction_numerical': 0.03251612903225806, 'mean_word_length': 4.324175824175824, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '501813', 'license': 'Apache-2.0', 'n_tokens_mistral': 1463, 'n_tokens_neox': 1345, 'n_words': 364, 'path': 'OOP_Concepts_2.ipynb', 'repo_name': 'JuliusCaezarEugenio/OOP-1-1', 'size': '3919'}