Try shorter delay times and see when the switch behaves erratically.
Change the sample code (for either the pulldown or pullup circuit) so that
pushing the button has the effect of changing the amount of time that the LED
is on, rather than simply turning on the LED. That is, make the LED blink on
every iteration of the loop. When the pushbutton is pressed, the blink time
should be relatively long (e.g., 1 seconds). When the pushbutton is not pressed,
the blink time should be relatively short (e.g., 0.2 seconds).
Add a second LED and use the pushbutton to control both of them at the same
Add a second LED and use the pushbutton to turn on one or the other one