Using Booleans

So I’m setting up a page in which the user is picking some options, and one of the options we’re using a boolean on, as it’s a yes or no question, seems to make sense. The boolean needs to make a variable that says true or false to talk to the code.

So let’s say the question is “Do you like cake? Yes or no,” how would you go about making the variable “cake” say either true or false?