if you check obj type of the four digit number that is input e.g. print(type(number)) you will find it is a string. Which should help you find the issues with your code.