Which license for GitHub?



I am going through the book iOS Programming and as I complete tasks in each chapter I am pushing my code to my GitHub account. I would like to add a license to my repository but am not sure which license would be appropriate, since most of the code is taken from the book. What is the most appropriate way for me to add a license that protects BigNerdRanch from their code being used verbatim in an app, while also allowing people to see how I have solved challenges to assist them in their learning process?