Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Restricted Sum solution in Clear category for Restricted Sum by IRONKAGE
def checkio(data):
if data:
return data.pop() + checkio(data)
return 0
if __name__ == '__main__':
assert checkio([1,2,3]) == 6
assert checkio([2,2,2,2,2,2]) == 12
assert checkio([43,-10,68,84,91,71,-10,-80,38]) == 295
assert checkio([-53,32,7]) == -14
print("Coding complete? Click 'Check' to earn cool rewards!")
Sept. 13, 2019
Comments: