Code for code block and random question