num_1 = 1010
num_2 = 1234
num_3 = 1034
num_1is the only valid number since it has both 1s and 0s.
num_2is invalid because it does not have any 1s or 0s.
num_3should also be invalid since it has digits other than 0s and 1s which are 2 and 4.
Note: you cannot use any
whileloop or any python function or method or string methods or built-in python methods all you can use are
How can we solve this to find the number which has only 1s and 0s in it?
The given integer can be in between the range 0 and 10000.