A workshop records required protective equipment, equipment issued to a student, and equipment in a locker using these Python sets.
required = {"gloves", "goggles"} issued = {"gloves", "goggles", "apron"} locker = {"mask", "goggles"} optional = set()
Evaluate each numbered test below. Enter exactly True or False in each corresponding table cell.
# Test 1 required <= issued # Test 2 required < issued # Test 3 required < required # Test 4 required.isdisjoint(locker) # Test 5 optional <= locker
Unlock full course notes by signing up
Tracing kiosk updates
A library kiosk tracks distinct visitor IDs using the Python code below. After every statement executes, how many distinct visitor IDs remain in seen? Enter the number of IDs as an integer, to zero decimal places.
New results and existing collections
A volunteer coordinator starts with these Python sets. Select every true statement. Evaluate each statement independently from the initial contents shown below.
Applying workshop eligibility rules
A robotics workshop uses these Python sets of participant IDs:
A participant is ready to enter only if registered, trained, and absent from blocked. Determine the number of ready participants and the number of registered participants missing training, regardless of blocking status. Enter both counts as integers, to zero decimal places. Do not modify the input sets.
A qualifying parcel or a qualifying zone
A warehouse assigns each parcel a two-digit integer code. The tens digit identifies its delivery zone. Even codes identify parcels eligible for an automated conveyor; odd codes identify parcels requiring manual handling.
For these positive integers, code // 10 extracts the tens digit, and code % 2 == 0 tests whether a code is even. The following Python expression is available as a starting point:
Find both quantities below, considering only zones represented in codes: