-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenc_2.py
More file actions
23 lines (20 loc) · 879 Bytes
/
enc_2.py
File metadata and controls
23 lines (20 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class BankAccount:
def __init__(self, owner, account, balance, password):
self.owner = owner
self.account = account
self.__balance = balance
self.__password = password
def balance_check(self, parol):
if parol == self.__password:
b = input('На сколько вы хотите изменить свой баланс? ')
self.__balance += int(b)
print('Ваш баланс: ' + str(self.__balance) + ' рублей')
else:
print('Неверный пароль')
print('Регистрация')
name = input('Введите имя: ')
password = input('Придумайте пароль: ')
egor = BankAccount(name, 666, 0, password)
print()
parol = input('Для того, чтобы пополнить баланс ведите пароль: ')
egor.balance_check(parol)