I used a book for this so I did not come up with any code. at one point it will not ask you what the number is but when the box comes up type what number that you think it is.
Credits to the book (Coding for beginners using Scratch) (anyone who has already done this prodject I did not copy you.)