Which of the following is the correct expression that evaluates to true if the number x is between 1 and 100 or the number is negative?

a. 1 < x < 100 && x < 0
b. ((x < 100) && (x > 1)) || (x < 0)
c. ((x < 100) && (x > 1)) && (x < 0)
d. (1 > x > 100) || (x < 0)


b A and D have syntax errors. B uses || for the OR operator. The correct answer is B.

Computer Science & Information Technology

You might also like to view...

In Microsoft Access 2016, calculations, such as sums, averages, minimums, and maximums, cannot be performed on the displayed records using a query datasheet.

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

Computer Science & Information Technology

The ________ operator is applied when two criteria are placed on the same row in the query design grid

A) Or logical B) Group By C) And logical D) Avg

Computer Science & Information Technology

Which of the following are examples of penetration testing methods? (Select the two best answers.)

A. The open source security testing methodology manual B. OVAL C. NIST penetration testing D. CERDEC

Computer Science & Information Technology

Which of the following is a scripting language?

A. Ruby B. Perl C. PHP D. All of the above

Computer Science & Information Technology