How to make an IF statement chosen at random

Even though I’m new to coding, I’d like to be able to know how to do this.

Say I’m making a game where if the coffee’s too hot, I want the character to either poor it down the sink or leave it there.

Is it possible to make one of these options chosen at random? What would the coding look like?

if (Random.value <= 0.5) {
Debug.Log(“Doing first thing”);
}
else {
Debug.Log(“Doing second thing”);
}

Alternate:

if (Random.Range(0,2) == 1) {
    Debug.Log("Doing first thing");
}
else {
    Debug.Log("Doing second thing");
}