<jupyter_start><jupyter_text>Python Classes and Objects<jupyter_code>class MyClass:
  pass
class OOP1_2:
  X=5
  print(X)<jupyter_output>5<jupyter_text>Create Objects<jupyter_code>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("Alliyah", 19) #create objects


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

person.name = "Francine"
print(person.name)
print(person.age)
  person.age = 20

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

del person.name
print(person.age)
print(person.name)<jupyter_output>20<jupyter_text>Application 1-Write a Python program that Computes the are of square, and name its class as square, side as attributes<jupyter_code>class Square:
  def __init__(self,sides):
    self.sides=sides
    
  def area(self):
    return self.sides*self.sides

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

square=Square(4)

print(square.sides)
square.display()<jupyter_output>4
the area of the square is: 16<jupyter_text>Application 2- Write a Python program that displays your full name, age, course, school.Create a class names Myclass, and name, age, school, course as attributes<jupyter_code>class Myclass:
  def __init__(self, name, age, school, course):
    self.name=name    
    self.age=age
    self.school=school
    self.course=course

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

person=Myclass("Alliyah", 19,"CVSU MAIN", "BSCPE")

print(person.name)
print(person.age)
print(person.school)
print(person.course)<jupyter_output>Alliyah
19
CVSU MAIN
BSCPE
{'fraction_non_alphanumeric': 0.11181192660550458, 'fraction_numerical': 0.013761467889908258, 'mean_word_length': 4.915254237288136, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '43333', 'license': 'Apache-2.0', 'n_tokens_mistral': 644, 'n_tokens_neox': 619, 'n_words': 150, 'path': 'OOP_Concepts.ipynb', 'repo_name': 'AlliyahFrancineRoxas/OOP-1-2', 'size': '1744'}