Help on pushbutton project

im a middle school student so im kinda clueless on syntax and whatnot, where should this variable and its affiliated coding fit in the above mentioned code? thanks for your help and time.