Created
February 13, 2014 18:07
-
-
Save JakenHerman/8980545 to your computer and use it in GitHub Desktop.
sorta_sum on Coding Bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'Jaken' | |
def sorta_sum(a, b): | |
sum = a + b | |
if sum >= 10 and sum <=19: | |
return 20 | |
else: | |
return sum |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.....