title: Syntax Error while Summation Operation in for loop of Python
body: <p>I am trying to define a function to convert a binary number to a decimal number and check if it is an absolute square or not. I am passing a list of binary numbers as the argument and the function is supposed to print "True" or "False" as the output in the same order as that of the list elements; depicting whether or not they are absolute squares.</p>
  
  <p>While trying so I am getting a syntax error in the ninth line where I am trying to calculate the decimal equivalent of the binary digits by adding the individual values arising out of each binary digit owing to it's position. 
  Logic of Execution: 1001 in Binary means [pow(2,3)*1 + pow(2,2)*0 + pow(2,1)*0 + pow(2,0)*1] in Decimal. It's equal to 9 which is an absolute square of 3. So the output should be "True"</p>
  
  <pre><code>import math
  
  n = int(input("Enter the total no of elements to check: "))
  num_list = []
  for k in range (n):
      print("Enter the number at position "+str(k)+" : ")
      num = int(input())
      num_list.append(num)
  
  #print(num_list) for debugging purpose
  
  def Binary_SquareRoot_Checker(input_list):
      for i in input_list:
          q = str(i)
          no_of_digit = len(q) 
          #For each element of the list, we need to count the no of digits present
          addition_num = 0
          for p in range (no_of_digit):
                  r = q[p]
                  value = (2**(no_of_digit - (p+1)) * int(r) 
                  addition_num = addition_num + value
          #print(addition_num) just to see the decimal number
          root = math.sqrt(sum_num)
          if int(root + 0.5) ** 2 == sum_num:
              #Checking for absolute square property
              print("True")
          else:
              print("False")
  
  Binary_SquareRoot_Checker(num_list)
  </code></pre>
  
  <p>I am getting <strong>Syntax Error</strong> at <code>addition_num = addition_num + value</code></p>
  
  <p>Please tell me why this error is being reported?</p>