JustCaptain kod-buduschego
0701e0af94c0959f3e8800a3ae422a1550bc7351
Перейти к файлу
Код
task_5.py
BALANCE: float = 100.0


def deposit(amount: float) -> None:
    global BALANCE
    BALANCE += amount
    print("Баланс: {}".format(BALANCE))


def withdraw(amount: float) -> None:
    global BALANCE
    if BALANCE < amount:
        print("Ошибка ты нищюк")
    else:
        BALANCE -= amount


deposit(amount=100)
withdraw(amount=50)
withdraw(amount=300)