Created
March 18, 2011 04:51
-
-
Save dmitric/875635 to your computer and use it in GitHub Desktop.
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
def sum_arithmetic_series(n): | |
return n*(n+1)/2.0 | |
def missing_one(upto,missing_one): | |
return sum_arithmetic_series(upto) - sum(missing_one) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment