<jupyter_start><jupyter_text>Python Classes and Objects<jupyter_code>class Myclass:
  pass
class OOP1_2:
  X = 5
  print(X)
class OOP1_2:
  def __init__(self,name,age):    #__init__(parameter)
    self.name = name          #attributes
    self.age = age

  def identity(self):
    print(self.name, self.age)

person = OOP1_2("Jeroh", 18) #create objects


print(person.name)
print(person.age)
print(person.identity)
#Modify the Object Name

person.name = "<NAME>"
print(person.name)
print(person.age)
person.age = 18

print(person.name)
print(person.age)
#Delete the Object

del person.name
print(person.age)
print(person.name)
class Square:
  def __init__(self,sides):
    self.sides = sides
  
  def area(self):
    return self.sides*self.sides  #formula to compute the area of the square

  def display(self):
    print("the area of the square is:", self.area())

square = Square(10)


print(square.sides)
square.display()
class MyClass:
  def __init__(self, name, age, course, school):
    self.name = name
    self.age = age
    self.course = course
    self.school = school

  def identity(self):
    print(self.name, self.age, self.course, self.school)

person = MyClass("<NAME>", 18, "BSCpE", "Cavite State University")

print(person.name)
print(person.age)
print(person.course)
print(person.school)<jupyter_output><NAME>
18
BSCpE
Cavite State University
{'fraction_non_alphanumeric': 0.12555066079295155, 'fraction_numerical': 0.012481644640234948, 'mean_word_length': 4.202290076335878, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '428109', 'license': 'Apache-2.0', 'n_tokens_mistral': 502, 'n_tokens_neox': 481, 'n_words': 121, 'path': 'OOP-1-2.ipynb', 'repo_name': 'Jerohlee/CPEN-21A-CPE-1-2', 'size': '1371'}