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)

Computer Science & Information Technology

You might also like to view...

When designing a query without using an operator, ________ is assumed

Fill in the blank(s) with correct word

Computer Science & Information Technology

One advantage of the counter variable method over familial references method is that it also provides the flexibility to insert new nodes into a document within theforloop without having to recalculate the length of the child nodes collection.

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

Computer Science & Information Technology