class BankAccount:

    # constructor
    def __init__(self, initialBalance):
        self.balance = initialBalance
        self.interestRate = 2.5

    def __str__(self):
        return "Account with $%.2f at %.1f%% interest" % (self.balance, self.interestRate)

    def inquiry(self):
        print "Balance is currently $%.2f" % self.balance

    def deposit(self, amount):
        if amount < 0:
            print "Sorry, amount cannot be negative"
        else:
            self.balance = self.balance + amount
            print "Deposited $%.2f" % amount

    def withdraw(self, amount):
        if amount < 0:
            print "Sorry, amount cannot be negative"
        elif amount > self.balance:
            print "Yeah, you wish."
        else:
            self.balance = self.balance - amount
            print "Withdrew $%.2f" % amount

    def compound(self):
        interest = self.balance * self.interestRate / 100.0
        self.balance = self.balance + interest
        print "Added $%.2f interest" % interest
        self.inquiry()

# Example:
# 
# >>> b = BankAccount(500)
# >>> print b
# Account with $500.00 at 2.5% interest
# >>> b.deposit(100)
# Deposited $100.00
# >>> b.inquiry()
# Balance is currently $600.00
# >>> b.withdraw(50)
# Withdrew $50.00
# >>> b.inquiry()
# Balance is currently $550.00
# >>> b.withdraw(750)
# Yeah, you wish.
# >>> b.compound()
# Added $13.75 interest
# Balance is currently $563.75
# >>>

