Besides practical books does anyone have opinions about these?
The Code Book by Simon Singh
The Codebreakers by David Kahn
The Mathematics of Secrets by Joshua Holden
The Code Book is what got me interested in cryptography and by extension computer science. I thought it was a fun and varied read.
There was a television series (British?) featuring some of the tales mentioned in David Kahn's book. The TV series could be a good introduction for children. Another book of interest may be Crypto by Stephen Levy - Viking Penguin 2001. Which relates how "rebels beat the (U.S.) government - saving privacy in the Digital Age".
Highly recommend 'The Code Book by Simon Singh'. Simon also runs a math circle online called parallel circles from the UK, that is free to attend and is fun for kids.
Simon Singh is a very entertaining writer, I'll give him that. (Also a pleasant person, I've met him once or twice.)
The Codebreakers is a fantastic book and I highly recommend it. I don't know what I think of it for a ten-year-old, it's been a while since I've read it, but my memory is that it is certainly mathematically accessible, but its length and depth may make it daunting, as it probably exceeds the attention horizon of a typical ten-year-old by an order of magnitude or two. But in chunks it could work, and for an adult it's fantastic.
It does assume a fair bit of historical context knowledge, though, much of which probably exceeds 5th grade. Probably 9th graders would have it easier as far as, e.g., familiarity with WWII, etc.