Python program, TCS

[TCS TNQT Question] Program to print the difference between the sum of numbers at odd and even indexes of a number

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
view raw 1.ipynb hosted with ❤ by GitHub

OR
AN ALTERNATIVE APPROACH WOULD BE

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
view raw 2.ipynb hosted with ❤ by GitHub