Newbie question : using  10K resistors in inp

Excellent site thanks. I've started looking through her tutorials.

So I'm guessing that while the switch is open the pin in is held low at 0V.

Without the resistor, the pin is considered to be floating and would be susceptible to problems with electrical noise. Right?