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. ((x < 100) && (x > 1)) || (x < 0)
```
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...

The Data Link Layer of the OSI model is

a. responsible for transmission of bits b. responsible for routing c. responsible for isolating the lower layers from the upper layers d. responsible for checking for errors

Computer Science & Information Technology

The active cell is marked with a _____ outline.

A. black B. green C. blue D. red

Computer Science & Information Technology

The ____ contains buttons that are used to create and insert new objects.

A. title bar B. Insert panel C. status bar D. Property inspector

Computer Science & Information Technology

If Bob wants to send a secure message to Alice using an asymmetric cryptographic algorithm, which key does he use to encrypt the message?

A. Alice's private key B. Bob's public key C. Alice's public key D. Bob's private key

Computer Science & Information Technology