<jupyter_start><jupyter_text>Classes<jupyter_code>#Global and local variable
def fun(a):
    a=5
    print (a) 
a=20
fun(a)
print (a)


#Global and local variable
def fun(b):
    b=5
    print (b) 
fun(b)
print (b)
class student():#defining class
    def __init__(self,age,name,sex,exam=0,test=1):#defining attributes
        self.age=age
        self.name=name
        self.sex=sex
        self.exam=exam
        self.test=test
    def details(self):# defining methods of a class
        print ("I am:", self.name, self.age, self.sex,self.test,self.exam)
                     
student1=student(2, "xyz","male",50,35) # student 1 - object of class student
st2=student(3,"abc","male")
student1.details() # accessing functions of a class
st2.details()





    
class student():#defining class
    def __init__(a,age,name,sex,exam=0,test=1):# a as the attribute reference instead of self
        a.age=age
        a.name=name
        a.sex=sex
        a.exam=exam
        a.test=test
    def details(a):# defining methods of a class
        print ("I am:", a.name, a.age, a.sex,a.test,a.exam)
                     
student1=student(2, "xyz","male",50,35) # student 1 - object of class student
st2=student(3,"abc","male")
student1.details() # accessing functions of a class
st2.details()
class student():#defining class
    def __init__(self,age,name,sex,exam=0,test=1):#defining attributes
        self.age=age
        self.name=name
        self.sex=sex
        self.exam=exam
        self.test=test
    def details(self):# defining methods of a class
        print ("I am:", self.name, self.age, self.sex,self.test,self.exam)
                     
student1=student(2, "xyz","male",50,35) # student 1 - object of class student
st2=student(3,"abc","male")
student1.details() # accessing functions of a class
st2.details()
class student(): #pass for creating simple class
    pass
                   
st1=student() #obj 1
st2=student() #obj 2
st1.firstname="Bag" # attributes 1
st1.age=30 # attributes 1
st2.firstname="ahhkjh"
st2.age=40
print (st1.age)<jupyter_output>30
{'fraction_non_alphanumeric': 0.1349129593810445, 'fraction_numerical': 0.029013539651837523, 'mean_word_length': 2.9865125240847785, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '120697', 'license': 'CC0-1.0', 'n_tokens_mistral': 745, 'n_tokens_neox': 704, 'n_words': 176, 'path': 'Online Certificate Course in Data Science and Machine Learning/19 Classes Ipython notebook file.ipynb', 'repo_name': 'jsrikantappa/nielit', 'size': '2068'}