Skip to content

Instantly share code, notes, and snippets.

@JakenHerman
Created February 13, 2014 18:07
Show Gist options
  • Save JakenHerman/8980545 to your computer and use it in GitHub Desktop.
Save JakenHerman/8980545 to your computer and use it in GitHub Desktop.
sorta_sum on Coding Bat
__author__ = 'Jaken'
def sorta_sum(a, b):
sum = a + b
if sum >= 10 and sum <=19:
return 20
else:
return sum
@willico235
Copy link

nice! I had success with:
if a + b in range(10,19):
return 20
else:
return a+b

Idk why but this solution failed the "other tests" row of testing.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment