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...

A ________ is a simplified version of a function used to test the main program.

What will be an ideal response?

Computer Science & Information Technology

RGB colors such as the ones in the accompanying figure range from ____.

A. 0 to 125 B. 0 to 255 C. 1 to 255 D. 1 to 256

Computer Science & Information Technology

Actions can be moved around by ________ them to the desired location

Fill in the blank(s) with correct word

Computer Science & Information Technology

If you configure the issuance requirements for a certificate issued from a template so that more than one signature is required before a certificate can be issued, which of the following is true?

A. Certificate enrollment is disabled B. Certificate enrollment is automatic C. The certificate is added to the CRL D. Autoenrollment is disabled

Computer Science & Information Technology