Re: In my experience
But another fraction
Maybe that's an argument for not teaching (the basics of) programming on a "normal" computer. Perhaps have some kind of "educational computer" which is specifically designed for the task and which it is more difficult simply to copy-and-paste stuff from da interwebs. These days you could quite easily make something based around a £10 Arduino, noting that some clones (e.g. from Adafruit) come with Circuit Python installed as standard, as well as being usable with the normal Arduino IDE.
M.