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...

A(n) ________ displays useful information about mouse actions, such as pointing to screen elements or dragging

Fill in the blank(s) with correct word

Computer Science & Information Technology

Talk about the use of cookies in ecommerce. Discuss how they are useful. Are they potentially dangerous?

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

When at the rightmost cell in a row, press the ENTER key to move to the first cell in the next row; do not press the TAB key.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Cloud computing can enable companies to collect massive amounts of data and then use sophisticated algorithms to make sense of that data to create better products and services. This characterizes which of the following benefits of cloud computing?

A. Customizing products and services B. Expanding the scope of business operations C. Mining insights from data D. Responding quickly to market changes

Computer Science & Information Technology