@@ -0,0 +1,730 @@
+#!/usr/local/bin/python%0A# Code Fights Deposit Profit Problem%0A%0A%0Adef depositProfit(deposit, rate, threshold):%0A    years = 0%0A    while deposit %3C threshold:%0A        deposit *= 1 + rate / 100%0A        years += 1%0A%0A    return years%0A%0A%0Adef main():%0A    tests = %5B%0A        %5B100, 20, 170, 3%5D,%0A        %5B100, 1, 101, 1%5D,%0A        %5B1, 100, 64, 6%5D%0A    %5D%0A%0A    for t in tests:%0A        res = depositProfit(t%5B0%5D, t%5B1%5D, t%5B2%5D)%0A        if t%5B3%5D == res:%0A            print(%22PASSED: depositProfit(%7B%7D, %7B%7D, %7B%7D) returned %7B%7D%22%0A                  .format(t%5B0%5D, t%5B1%5D, t%5B2%5D, res))%0A        else:%0A            print(%22FAILED: depositProfit(%7B%7D, %7B%7D, %7B%7D) returned %7B%7D, answer: %7B%7D%22%0A                  .format(t%5B0%5D, t%5B1%5D, t%5B2%5D, res, t%5B3%5D))%0A%0A%0Aif __name__ == '__main__':%0A    main()%0A

Solve Code Fights deposit profit problem