├── README.md ├── bank ├── __pycache__ │ ├── abcd.cpython-311.pyc │ ├── amusment.cpython-311.pyc │ └── bank.cpython-311.pyc ├── account.py └── bank.py └── notebook ├── __pycache__ └── note.cpython-311.pyc ├── note.py └── notebook.py /README.md: -------------------------------------------------------------------------------- 1 | # python-oop 2 | author:https://github.com/rezadrakhshan/ 3 | -------------------------------------------------------------------------------- /bank/__pycache__/abcd.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rezadrakhshan/Object-Oriented-Programming-OOP-/2e4a59c6fc4d158e0bd4e24c2e7c1263f3ee4c0e/bank/__pycache__/abcd.cpython-311.pyc -------------------------------------------------------------------------------- /bank/__pycache__/amusment.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rezadrakhshan/Object-Oriented-Programming-OOP-/2e4a59c6fc4d158e0bd4e24c2e7c1263f3ee4c0e/bank/__pycache__/amusment.cpython-311.pyc -------------------------------------------------------------------------------- /bank/__pycache__/bank.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rezadrakhshan/Object-Oriented-Programming-OOP-/2e4a59c6fc4d158e0bd4e24c2e7c1263f3ee4c0e/bank/__pycache__/bank.cpython-311.pyc -------------------------------------------------------------------------------- /bank/account.py: -------------------------------------------------------------------------------- 1 | import random 2 | from bank import BankAccount 3 | list = ["0","1","2","3","4","5","6","7","8","9"] 4 | 5 | class person: 6 | product_list = [] 7 | def __init__(self,name,id,mablagh) : 8 | self.bank = BankAccount() 9 | self.name = name 10 | self.id = id 11 | self.mablagh = mablagh 12 | temp = "4444" 13 | for i in range(12): 14 | temp += random.choice(list) 15 | self.credit_number = int(temp) 16 | 17 | def add(self,mablagh): 18 | self.bank.variz(self.name,self.id,self.credit_number,927949729247924794,mablagh) 19 | self.product_list.append(self.name) 20 | return self.product_list 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /bank/bank.py: -------------------------------------------------------------------------------- 1 | class BankAccount: 2 | def __init__(self,name): 3 | self.bankname = name 4 | 5 | 6 | def variz(self,user_name,user_id,credit_card,destinition_number,availble_amount): 7 | pass 8 | 9 | def harvest(self,user_name,user_id,credit_passsword,availble_amount): 10 | pass 11 | 12 | @staticmethod 13 | def vam(user_if,mablagh): 14 | pass -------------------------------------------------------------------------------- /notebook/__pycache__/note.cpython-311.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rezadrakhshan/Object-Oriented-Programming-OOP-/2e4a59c6fc4d158e0bd4e24c2e7c1263f3ee4c0e/notebook/__pycache__/note.cpython-311.pyc -------------------------------------------------------------------------------- /notebook/note.py: -------------------------------------------------------------------------------- 1 | 2 | class note: 3 | def __init__(self,memo:str,tag:str = ""): 4 | self.memo = memo 5 | self.tag = tag 6 | 7 | 8 | def search(self,exmemo) -> bool: 9 | if exmemo in self.memo or self.tag: 10 | return True 11 | return False 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /notebook/notebook.py: -------------------------------------------------------------------------------- 1 | from note import note 2 | 3 | class Notebook: 4 | note_list =[] 5 | 6 | def __init__(self): 7 | pass 8 | 9 | def create_note(self,memo,tags=""): 10 | self.note_list.append(note(memo,tags)) 11 | 12 | def read_note(self,tag): 13 | for i in self.note_list: 14 | if i.tag == tag: 15 | return True 16 | else: 17 | return False 18 | 19 | def update_note(self,current_memo,new_memo): 20 | for i in self.note_list: 21 | if i.memo == current_memo: 22 | i.memo = new_memo 23 | return i.memo 24 | else: 25 | return "its not found." 26 | 27 | 28 | def delete_note(self,memo): 29 | for i in self.note_list: 30 | if i.memo == memo: 31 | self.note_list.remove(i) 32 | return True 33 | else: 34 | return False 35 | 36 | 37 | 38 | Notebook = Notebook() 39 | Notebook.create_note("snowy night","winter") 40 | print(Notebook.delete_note("snowy night")) 41 | print(Notebook.note_list) --------------------------------------------------------------------------------