<jupyter_start><jupyter_text>Objects and Classes in Python Inheritance Polymorphism Encapsulation Abstraction<jupyter_code>1 + 2
2 + 3.0
'Hello' + 'World'
1 * 2
'hello' * 2
class class1:
    def __init__(self, name, age):
        self.name = name
        self.age = age 
        
    def display(self):
        print(self.name,self.age)
        
c1 = class1('Tom', 25)
c1.name
c1.age
c2 = class1('John', 30)
c2.name
c2.age
c1.display()
c2.display()
type(c1)
type(c2)<jupyter_output><empty_output><jupyter_text>Inheritance<jupyter_code>class Person:
    def __init__(self, name, age):
        self.name = name
        self.age = age 
        
    def display(self):
        print(self.name,self.age)
class Employee(Person):
    def __init__(self,name, age, empid):
        self.empid = empid
        super().__init__(name, age)
        
        
    def display(self):
        print(self.empid)
        super().display()
e1 = Employee('Tom', 30, 101)
e1.name
e1.age
e1.display()

a = 'hello'
type(a)
a.upper()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1348747591522158, 'fraction_numerical': 0.03275529865125241, 'mean_word_length': 2.8339483394833946, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '141171', 'license': 'Apache-2.0', 'n_tokens_mistral': 413, 'n_tokens_neox': 390, 'n_words': 82, 'path': 'Session_6_(Classes_and_Objects).ipynb', 'repo_name': 'madhavjk/CP-Python', 'size': '1038'}