Write Boolean expressions that represent the given English expressions. Assume any variables used have been declared and initialized
a) at least one of x or y is odd
b) at least one of x or y is non-negative (x is non-negative is written x >= 0)
c) The hit is no more than 2.5 units away from target
d) x is 1 or x is equal to y
e) t is strictly between 3.2 and 3.3
a) ```
(x%2==1) || (y%2==1)
```
b) ```
(x >= 0) || (y>=0)
```
c) ```
((hit - target) <= 2.5 ) && ((hit - target) <= -2.5)
```
d) ```
(1==x) || (x==y)
```
e) ```
(3.2 < t) && (t < 3.3)
```
You might also like to view...
Explain how 2D engineering drawings are produced.
What will be an ideal response?
The #REF error means that ________
A) the required value has been left out of an argument B) the cell you are referencing no longer exists C) you are using the wrong type of data D) you are referencing an invalid number
How does business process reengineering (BPR) differ from software reengineering?
What will be an ideal response?
When you want a folio to be able to be rotated and viewed horizontally and vertically, you should click the _______________ folio option in the New Folio dialog box.
Fill in the blank(s) with the appropriate word(s).