all assertions goes ok, but task fails:
def checkio(data):
balance, withdrawal = data
for w in withdrawal:
if w % 5 == 0 and w + 1 <= balance:
balance -= w + 1
return balance
#These "asserts" using only for self-checking and not necessary for auto-testing
if __name__ == '__main__':
assert checkio([120, [10, 20, 30]]) == 57, 'First example'
# With one Insufficient Funds, and then withdraw 10 $
assert checkio([120, [200, 10]]) == 109, 'Second example'
#with one incorrect amount
assert checkio([120, [3, 10]]) == 109, 'Third example'
assert checkio([120, [200, 119]]) == 120, 'Fourth example'
assert checkio([120, [120, 10, 122, 2, 10, 10, 30,
1]]) == 56, "It's mixed all base tests"
Created at: 2013/08/05 17:08; Updated at: 2013/09/30 13:47