## [Solved] Python code to sum the square values of numbers from 1 to n

Here is how you would do it in Python 2: n = int(raw_input(“Type n:”)) total = 0 for i in range(1,n+1): total += i**2 print total Here is how you would do it in Python 3: n = int(input(“Type n:”)) total = 0 for i in range(1,n+1): total += i**2 print(total) This takes the numbers … Read more