Question: For problems 1 and 2: For these problems, by Boolean Expression we mean an inequality that Python can evaluate as true or false. E.g. 2

For problems 1 and 2: For these problems, by Boolean Expression we mean an inequality that Python can evaluate as true or false. E.g. 2 < x 2 and x <=4.

1. a. If x and y are both numbers: write the Boolean expression that will state that (x 2y) is greater than 0 and less than 12.

b. if x = 1 and y = 2, what value would Python assign to the expression you wrote in part a.? Why?

c. if x = 1, y = 2, and z = False, what value will Python return if you type in this expression, and why? z == True and x > 0 or y < 1

d. If x and y are both numbers, write the Boolean expression that states:

i. each is between -1 and 4 inclusive.

ii. one or the other or both is less than or equal to -.5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!