i want to make a python program that ask from the user a number and the program should sums up the first n squares as long as the sum is smaller (not smaller than or equal to) than the numb er that the user has choose before Like this line
1+2**2 +3**2+4**2 +....+n2 < the number that the user choose
For example if the the number 20, n is 3 the result will be 1 + 4 + 9 < 20
The easiest way is to sum up the squares until the sum is greater than or equal to the chosen number and then remove the last square. (That is, subtract $1$ at the end).