Function sum of square python : Im trying to code the sum of squares in python and i'm pretty new to this

this is what i have for now, 

        n=int(input("n="))

        def sumsquare(n):
        sum=0
        i=0
        while(n<=i):
        sum= sum + i**2

Basically what i'm trying to do is to make the user choose a number, and based on that number I want to calculate the sum of squares , and return "The sum of square is ___"

Thanks in advance for your help !