JustCaptain kod-buduschego
fe9c6c08be73ce67e8771ed2945bb1d512df3ae4
Перейти к файлу
Код
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)