Young lovers often use a daisy to determine the true feelings of the other. With each petal they count, they alternate “She loves me” and “She loves me, not.” Generate a random number up to 25 and then use that to determine if your girlfriend (or boyfriend) loves you. Even numbers mean love. Other numbers mean not. Display the process.

What will be an ideal response?

```
var num = Math.round(Math.random()*25);
if(num % 2 == 0)
alert(“love”);
else
alert(“not”);

```

Computer Science & Information Technology

You might also like to view...

Which of the following is a Python keyword??

A. ?elif B. ?else C. ?def D. ?all of the above

Computer Science & Information Technology

In the code editor, ____ is used to indicate the location of an error.

A. blue text B. a red squiggly line C. green text D. a green squiggly line

Computer Science & Information Technology