Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Funny Addition by Kurush
def checkio(data):
a, b = data
if abs(a) < abs(b): a, b = b, a
if b > 0:
while b > 0:
a += 1
b -= 1
return a
else:
while b < 0:
a -= 1
b += 1
return a
if __name__ == '__main__':
assert checkio([5, 5]) == 10, 'First'
assert checkio([7, 1]) == 8, 'Second'
print('All ok')
June 29, 2014