A login system computes admit = NOT (isBlocked OR attempts > 4), where isBlocked is Boolean and attempts is a nonnegative integer count of failed attempts. Which expressions give the same value as admit for every allowed input? Select all that apply.
(NOT isBlocked) AND (NOT (attempts > 4))
NOT (isBlocked OR attempts >= 4)
(NOT isBlocked) OR (attempts <= 4)
(NOT isBlocked) AND (attempts <= 4)
Unlock full course notes by signing up
Power available with a detected fault
A portable instrument evaluates (batteryPercent >= 35 OR externalPower) AND NOT faultDetected. Its battery level is 28%, externalPower is true, and faultDetected is true. What Boolean value does the whole expression produce? Answer true or false.
Building an alarm condition
An equipment alarm should be true when the door is open, the access code is invalid, or both. The Boolean variables doorClosed and codeValid are true exactly when their names describe the current state. Complete this construction using AND, OR, or NOT: first combine doorClosed and codeValid with ________; then apply ________ to that entire grouped result.
Bike-share unlock conditions
A bike-share app decides whether to offer a ride using these Python variables for one customer:
Evaluate each expression below with these values. Enter true or false for each one.
Expression A: battery >= 40 and distance_km < 5
Tracing the evaluation order
In Python, the variables have the values a = 7, b = 1 and c = False. The program then evaluates the condition below.
With these values every part of the condition is needed. Arrange the operations in the order Python actually performs them at run time, from first to last.