This is guess the number! This was in my book: Usborne coding for beginners using Scratch.
Thanks to @Usborne for the coding book.