Putting a series resistor in an input pin is rather like putting stabilizers on a Harley Davidson. A rather stupid thing to do.
No it doesn’t, if they are that stupid then they will find much easier ways to destroy their Arduino. An output can withstand the odd short short to ground without too much damage.
But if you really really must do something like this then use a resistor that has the smallest possible negative effect and limits the current to 40mA, so that will be a 130R.
No, the tutorial did not say, “Putting a series resistor in an input pin”.
The tutorial suggested a low ohm protective resistor in series with the switch.
You say, “without too much damage”.
Any damage, is too much damage.
The series resistor does work and does limit a shorted output to 40ma, as you finally admit.
So what, if there are other ways to destroy an arduino?
You say, “if they are that stupid”.
They are not stupid, they lack experience.
The series resistor does protect the output pin until they gain the experience, then they can remove it.
You say, “Putting a series resistor in an input pin is rather like putting stabilizers on a Harley Davidson.”
No, it is not anything like your ridiculously extreme analogy.
The beginner does get a tricycle.
Then the intermediate person gets a bicycle, with training wheels.
Then advanced person will remove the training wheels, when they are ready.
Then the expert can ride a motorcycle.
The book the OP was reading from, was for the beginner, not for the expert.
Do you not understand, how people learn?
First we crawl, then we walk, then we run.
If the output resistance is 25 ohms then
the protective series resistor can be as low 120 ohms.