Merging 3 sketches NOOB ALERT!

I find it interesting that you know that you can, and need to, change pin numbers, but that you don't know that you can, and should, change the name of the variable that the value returned by digitalRead() is stored in.

Of course, inputPin and sensorPin are useless names. Of course, it's an input pin, or you wouldn't be reading it. Of course there is a sensor connected. What kind of sensor? That is what the variable name should reflect (along with the fact that it IS a pin number or a pin state).