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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started