216k views
4 votes
Suppose variables roll1 = 3 and roll2 = 4, which of the following will be evaluated as true?

roll1>3 || roll2 > 3

roll1>3 && roll2 > 3

!(roll1==3)

roll1>3 || roll2 < 3

User Ranjeet
by
5.6k points

1 Answer

0 votes

Answer:

The correct answer for the given question is " roll1>3 || roll2 > 3 "

Step-by-step explanation:

In option A, there are two conditions separated by OR. In OR, if any condition is true then it will return TRUE. There second condition is TRUE in the statement that is why the whole expression return TRUE.

Thats why the correct answer is "roll1>3 || roll2 > 3".

User Giovannia
by
5.8k points