Last active
April 22, 2016 15:18
-
-
Save yuda110/e57c321e88d0c7492d45f62a1777ef16 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
#python3 | |
def sum_square(range_from, range_to) : | |
sum_square = 0 | |
for i in range(range_from, range_to) : | |
sum_square += i**2 | |
return sum_square | |
def square_sum(range_from, range_to) : | |
sum = 0 | |
for i in range(range_from, range_to) : | |
sum += i | |
return sum**2 | |
print(square_sum(1, 101) - sum_square(1, 101)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment