Listing 10 - Page 0: No Title

##############################################################################
# Python From Scratch
# Autor: Nilo Ney Coutinho Menezes
# Editora Novatec (c) 2010-2024
# Site: https://pythonfromscratch.com
#
# File: listing\chapter 10\10.1440 - No Title.py
# Description: No Title
##############################################################################

class SpecialAccount(Account):
    def  __init__(self, clients, number, balance=0, limit=0):
        super(). __init__(clients, number, balance)
        self.limit = limit
    def serve(self, value):
        if self.balance + self.limit >= value:
            self.balance -= value
            self.operations.append(["WITHDRAW", value])
Click here to download the file