6.py
355 Bytes
#!/usr/bin/python
import sys;
def sumSquares(start, end):
num = 0;
for i in range (start, end+1):
num += i**2;
return num;
def squareSum(start,end):
num = 0;
for i in range (start, end+1):
num += i;
return num**2;
start = int(sys.argv[1]);
end = int(sys.argv[2]);
print "Result is: " + str(squareSum(start,end) - sumSquares(start,end));