"the push button will switch off the led on pressing."Where do you read an input?.
The question is still the same. In the code you posted, where do you read the input so the program can be controlled by the state that is read?
but it just turn off the led and remain off, and does not do the random again..