summaryrefslogtreecommitdiff
path: root/Problem6.py
blob: 78d79583828485b99bcb1a0a374330e240908a89 (plain)
1
2
3
4
5
6
7
8
9
10
11
def sumofsquares(n):
    sum = 0
    for x in range(1,n+1):
        sum+=(x*x)
    return sum
def squareofsum(n):
    sum = 0
    for x in range(1,n+1):
        sum+=x
    return (sum*sum)
print(squareofsum(100) - sumofsquares(100))