Flood Detection System

How is the input wired ?
Any pullup or pulldown resistors in place ?
What do you see if you print x (a truly awful name for a variable, by the way) after reading the input ?