From the book "The Hobbit"
Answers 3Add Yours
It was really a combination of the two. Bilbo is trying to think of a question as he fumbles in his pocket, and just mumbles aloud "What have I got in my pocket?" Gollum hears this and believes it is Bilbo's riddle. Bilbo, realizing that he has hit upon a question that Gollum cannot possibly answer, goes along with it, which was quick thinking on his part.
can you answer my other ones?
Bilbo used 1/10 (10%) wit and the rest luck.