Q:

Python while loop to keep adding the squares until the sum is greater or equal to 10000

I would like to write a while loop to keep adding the squares of consecutive integers starting from 1 (inclusive) until the sum is greater or equal to 10000 in python.Then print the integer and the sum when the condition is satisfied for the first time. Here is what I have but the code does not work. 
total = 10000
i = 0
ger = 0

while i <= total:
  ger += i**2
print(ger)
print(i)

A:

You forgot to increment i in each loop iteration. Also, your condition is not correct: you need to compare ger (the sum of squares) to total.
while ger <= total:
  ger += i**2
  i += 1

