<jupyter_start><jupyter_text>class<jupyter_code>my_list=list()#liste sınıfında bir mylist oluşturma<jupyter_output><empty_output><jupyter_text>instance & attribute<jupyter_code>#class Sınıfismi():
#snake= my_string
#camel = myString

class Musician():
    job="musician"
    
    def __init__(self,adı,yaş):
        self.name= adı
        self.age = yaş
    #metod
    def sing(self):#instance a bağlayan kelime
        print(f"we are the champions:{self.age}")
        #self ile çağırdık<jupyter_output><empty_output><jupyter_text>def __init__(self,adı,yaşı,tür):bu sınıftan bir instance oluşturduğunda ilk çağrılan fonksiyon bu oluyorself instance a referans veriyor<jupyter_code>my_musician = Musician ("şebnem",50)
my_musician.age
my_musician.name
my_musician.name="ferah"
my_musician.name

my_musician.job="singer"
my_musician.job
my_musician.sing() #metod çağırma
class DogYears():
    year_factor=7
    def __init__(self,age=4):
        self.age=age
        self.age_multiplied=age*7
        self.name="bar"
    def calculation(self):
        return self.age*self.year_factor
my_dog=DogYears()
my_dog.calculation()
my_dog.name<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10920034393809114, 'fraction_numerical': 0.004299226139294927, 'mean_word_length': 5.0310880829015545, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '307974', 'license': 'MIT', 'n_tokens_mistral': 478, 'n_tokens_neox': 462, 'n_words': 73, 'path': '25-OOPclass.ipynb', 'repo_name': 'SongulKizilay/PythonNotlarm', 'size': '1163'}