Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Account:
- def __init__(self, id: int, balance, pin: int):
- self.__id = id
- self.__pin = pin
- self.balance = balance
- def get_id(self, pin):
- if pin == self.__pin:
- return self.__id
- return 'Wrong pin'
- def change_pin(self, old_pin, new_pin):
- if old_pin == self.__pin:
- self.__pin = new_pin
- return 'Pin changed'
- return 'Wrong pin'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement