5.10.4: Snake Eyes

My code:


var SENTINEL = 1;




function start(){


var diceOne;


var diceTwo;




while(true) {

println("" + diceOne + "," + diceTwo);


diceOne = Randomizer.nextInt(1,6);


diceTwo = Randomizer.nextInt(1,6);




if (diceOne && diceTwo == SENTINEL){

println("" + diceOne + "," + diceTwo);


break;


}


}

}






What am I doing wrong here?

Respuesta :

Answer:

You didn't specify what the function actually does. BTW, good luck coding, I love coding and it is lots of fun, just stick with it!

Explanation: