NameError: name 'i' is not defined in python : i am using following code to find the sum of digit in python but it shows an error[enter image description here][1]


  [1]: https://i.stack.imgur.com/ZX8WN.png