Int object is not subscriptable

You first set b = 0 later you have loop that my guess is you assu e will set b = input(). But d was set to 0 so the while d == 1 is false.
Therefore b is not changed.

It helps to keep the the type of data in a variable the same, int or string.

It helps to use variables with meaningful name, I have no idea what d represents for example.