Question

Use truth tables to determine whether the Python expressions in each pair are equivalent. i) x,...

Use truth tables to determine whether the Python expressions in each pair are equivalent.
i) x, y, and z are variables with boolean values
- not x or not y or not z
- not (x and y and z)
ii) x is a variable with an integer value
- x > 0 and x <100 and not x%2==0
- not (x<0 or x>100 or x%2==1)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1)The results in the yellow columns are same

So the expressions are equal

x y z not X not Y not Z not x or not y or not z (x and y and z) not (x and y and z)
F F F T T T T F T
F F T T T F T F T
F T F T F T T F T
F T T T F F T F T
T F F F T T T F T
T F T F T F T F T
T T F F F T T F T
T T T F F F F T F

2)

For this lets take X>0=K that means   X<0= not K

X<100 = L ==> X>100= not L

X%2==0=M ==> X%2== 1= not M

K L M not K not L not M K and L and not M (not K or not L or not M not(not K or not L or not M)
F F F T T T F T F
F F T T T F F T F
F T F T F T F T F
F T T T F F F T F
T F F F T T F T F
T F T F T F F T F
T T F F F T T T F
T T T F F F F F T

The the results in the yellow columns are not equal.So the expressions are not equal

Add a comment
Know the answer?
Add Answer to:
Use truth tables to determine whether the Python expressions in each pair are equivalent. i) x,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 5 – (8 points) Determine whether the following statement is True or False using a Truth...

    5 – (8 points) Determine whether the following statement is True or False using a Truth Table. Assume that x, y, and z represent Boolean variables. (x+ y)z=(x+ yz X у Z x+ y x+y Z (x+ y)2 1 1 1 1 1 0 1 0 1 0 0 0 1 1 0 1 0 0 0 1 0 0 0 Are the expressions equal? Yes

  • Using truth tables, determine whether the following expressions are the same or not. Do not simplify...

    Using truth tables, determine whether the following expressions are the same or not. Do not simplify equations. a'b + a'c + ac b(a'c' + c) + b'c c + a'b' Simplify the following expressions using algebraic rules: (a+b+c)(a’+b+c)(a+b’+c’)(a’+b’+c’) (2 terms, 4 literals – POS form) The rest will be SOP form: ab'c + bd + bcd'+ ab'c' + abc'd (3 terms, 6 literals) xyz’ + x’yz’ + x’yz + xyz (1 terms, 1 literal) a’b’c’ + a’bc’ + a’bc +...

  • Python Activity 05 Boolean Expressions - POGIL (5) - Word Search m Layout References Mailings Review...

    Python Activity 05 Boolean Expressions - POGIL (5) - Word Search m Layout References Mailings Review View Help Critical Thinking Questions Programming Structures Sequence Structure Decision or Branching Structure Looping Structure FALSE Which structure best describes the types of Python programs you have written so far? _sequence structure Which structure allows the programmer to create code that decides what code is executed? FYI: Conditional operators, also known as relational operators, are used to compare the relationship between two operands. Expressions...

  • 4. Use truth tables to determine whether the following two statements are logically equivalent. (P+Q)^(~Q) and...

    4. Use truth tables to determine whether the following two statements are logically equivalent. (P+Q)^(~Q) and ~ (PVQ)

  • QUESTION 2 Boolean or "truth-valued" expressions are how we express conditions that control choices and repetition...

    QUESTION 2 Boolean or "truth-valued" expressions are how we express conditions that control choices and repetition in computer languages. Consider the following Python Boolean expression, where variables alpha, beta, and gamma are of type Boolean: alpha and (beta or gamma) In any algebraic notation there are usually several different ways of writing the same expression. For instance, in integer arithmetic the value of expression '4 x (5 + 2)' is numerically equivalent to that of expression '(4 x 5) +...

  • 1. Find the Boolean expression of the truth table. Then simplify it and convert it into...

    1. Find the Boolean expression of the truth table. Then simplify it and convert it into the least amount of logic gates possible. AB Output 100 011 101 2. Find the POS form of the Boolean expressions below. Find the truth table and logic minimization method of it. Show its gate level implementation, and show the same gate level implementation using only NAND gates. A(X,Y,Z)= m(0,2,4,6) B(X,Y,2)={m(0,4,5) 3. Create a J-k Flip Flop using a D-Flip Flop. Show its truth...

  • I need the full step by step answer Determine the truth value of each of the...

    I need the full step by step answer Determine the truth value of each of the following statements in which the domain of each variable is the real numbers. If false, provide a counter example, see definition 1 p.170 Forall x y (x = y^2) F - suppose x = 2, there then is no integer y such that y^2 = 2. X Forall y (x = y^2) F - says that no matter what x we pick, it must...

  • Directions. Determine whether the following three arguments are valid using the truth table method. Use the...

    Directions. Determine whether the following three arguments are valid using the truth table method. Use the Indirect Truth Table method as found in the link on Canvas. Indicate whether each is valid or not. Note that ‘//’ is used as the conclusion indicator and ‘/’ is used to separate the premises. [Note: Use only the following logical symbols: ‘&’ for conjunctions, ‘v’ for disjunctions, ‘->’ for conditionals, ‘<->’ for biconditionals, ‘~’ for negations.] Show your truth tables. 1. (S <->...

  • Please help with computer science Consider the following truth table, where X, Y, and Z are...

    Please help with computer science Consider the following truth table, where X, Y, and Z are Boolean variable inputs and W is a Boolean-valued result: X Y Z W 0 0 0 1 0 0 1 0 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 0 Write an expression for the above table using ~&|. Consider the following truth table, where X, Y, and Z...

  • 1. Use a truth table in canonical form below to show that ¬p∧q and ¬p∧¬q are...

    1. Use a truth table in canonical form below to show that ¬p∧q and ¬p∧¬q are not equivalent. Feel free to make necessary adjustments to the table. p q p∧q ¬p ¬q ¬p∧q ¬p∧¬q 2. Tell whether the following two expressions are equivalent by constructing their truth tables in canonical form. You may make necessary adjustments to the table provided below. Is p∨q∧rlogically equivalent to p∨q∧p∨r? p q r q∧r p∨q p∨r 3. Prove or Disprove (make sure to show...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT