Difference between revisions of "Logical operators assignment"
From WLCS
(Created page with " '''Exercises:''' * Evaluate and simplify the following as True or False not(False) True or False False and False True and False not(True or False) True or True False and True F...") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | ==Directions== | ||
+ | # Open a Google Doc | ||
+ | # Title the file: Logical Operators Assignment | ||
+ | # Put your name at the top | ||
+ | # Complete the exercises below in this file | ||
+ | # Be sure to number each of your answers!! | ||
+ | # Submit your assignment via Canvas | ||
+ | ==References== | ||
+ | * [[Media:BooleanLogic.ppt]] | ||
+ | ==Exercises== | ||
+ | * Evaluate and simplify the following as True or False | ||
+ | # not(False) | ||
+ | # True or False | ||
+ | # False and False | ||
+ | # True and False | ||
+ | # not(True or False) | ||
+ | # True or True | ||
+ | # False and True | ||
+ | # False or True | ||
+ | # not(False) and True | ||
+ | # not(True) or False | ||
+ | # not(True) or True | ||
− | + | * Evaluate the following comparisons with logic operators (assume x = 2; y = 5) | |
− | * Evaluate | + | # x + 2 > y or y < 10 |
− | not( | + | # not(x < y) and y > 2 * x |
− | + | # y > 0 and y < 10 or x > 10 and x < 20 | |
− | + | # x + y != 5 and x - y < 0 | |
− | + | # x == 2 and y != 5 | |
− | + | # x != y or y >= x | |
− | + | # not(x == 2 and y == 5) | |
− | + | # x != 2 or y != 2 | |
− | + | ||
− | not( | + | ==Submit== |
− | + | * Submit your assignment via Canvas | |
− |
Latest revision as of 06:04, 25 September 2018
Contents
Directions
- Open a Google Doc
- Title the file: Logical Operators Assignment
- Put your name at the top
- Complete the exercises below in this file
- Be sure to number each of your answers!!
- Submit your assignment via Canvas
References
Exercises
- Evaluate and simplify the following as True or False
- not(False)
- True or False
- False and False
- True and False
- not(True or False)
- True or True
- False and True
- False or True
- not(False) and True
- not(True) or False
- not(True) or True
- Evaluate the following comparisons with logic operators (assume x = 2; y = 5)
- x + 2 > y or y < 10
- not(x < y) and y > 2 * x
- y > 0 and y < 10 or x > 10 and x < 20
- x + y != 5 and x - y < 0
- x == 2 and y != 5
- x != y or y >= x
- not(x == 2 and y == 5)
- x != 2 or y != 2
Submit
- Submit your assignment via Canvas