There's a few ways to accomplish what you're looking for. I don't want to give the answer away, because learning how to look for the answer is a huge part of learning programming. I'll give the following hints:
- There is a programming concept called "casting", where one datatype is changed to another datatype. The conversion will fail if the destination data type is not compatible with the input (for example, "1.0" could be converted to an integer, but "Apple" could not)
- You can find the datatype of a variable using python's "type()" builtin function
- If a cast fails, it throws an exception
Since he's looking specifically for binaries, and it looks like he's got the letters vs numbers figured out, I'll give one more hint for the binary check:
- Python's "int()" function takes two inputs
If he's still stuck, here's a potential solution. But please have him try to figure it out without peeking, he'll learn a lot more that way.