Let A = {1, 2, 3, 4} and B = {3, 4, 5}. What are A ∩ B and A ∪ B, in that order?
A. {3, 4} and {1, 2, 3, 4, 5}
B. {1, 2, 3, 4, 5} and {3, 4}
C. {1, 2} and {5}
D. {3, 4} and {1, 2, 5}
What is A?
Intersection keeps only the elements both sets share, 3 and 4; union collects every element from either set, listed once. B swaps the two operations. C is the difference in each direction (A minus B, then B minus A), not intersection and union. D gets the intersection right but gives the symmetric difference for the union, dropping the shared elements that a union keeps.
Which statement best describes digital forensics?
A. Designing firewalls and intrusion detection systems to block attacks
B. The recovery and investigation of material found in digital devices, often in relation to computer crime
C. Writing antivirus signatures to remove malware from infected machines
D. Encrypting stored data so that it cannot be read without a key
What is B?
Forensics happens after the fact: it recovers, preserves, and analyzes evidence from devices and networks, usually to support an investigation or a legal case. A is network security, which is preventive. C is incident remediation, which cleans up but does not preserve evidence; wiping malware can destroy the very artifacts an examiner needs. D is a confidentiality measure, not an investigative one.
Which three components are found in every robotic system, and what does each do?
A. A keyboard for input, a monitor for output, and a printer for records
B. Sensors to gather input, a controller to process it, and actuators to produce motion
C. A compiler, an interpreter, and a linker
D. A router, a switch, and a modem
What is B?
A robot is a loop: sense, decide, act. Sensors (light, touch, ultrasonic, gyroscope) feed data to a controller, which runs the program and drives actuators such as motors and servos. A lists computer peripherals, not robot parts. C lists language tools used to build the program, not to run the robot. D is networking hardware.
Which list names basic elements of game design?
A. RAM, CPU, GPU, and storage
B. Encryption, hashing, and authentication
C. Rules (mechanics), goals, challenge, and player feedback
D. Loops, variables, and arrays
What is C?
A game is defined by what the player is trying to do (goals), what they are allowed to do (rules), what makes it hard (challenge), and how they learn whether they are succeeding (feedback). Those elements hold for a board game and a mobile game alike, which is why board games are a useful tool for collecting play-test data before any code is written. A is hardware. B is security. D is programming vocabulary that can implement a game but does not define one.
Let p be true and q be false. What are the values of p ∧ ¬q, p ∨ q, and p → q, in that order?
A. false, true, true
B. true, true, false
C. true, false, false
D. false, false, true
What is B?
¬q is true, so p ∧ ¬q is true AND true, which is true. p ∨ q needs only one true operand, and p is true. p → q is the one row where an implication fails: the condition holds and the result does not. A negates the wrong operand in the first expression and then makes the implication pass. C has OR failing with a true operand. D reverses every value.
Let p mean "it rains" and q mean "the field trip is canceled." Which statement represents "If it rains, the field trip is canceled"?
A. p ∧ q
B. p → q
C. q → p
D. p ↔ q
What is B?
"If p then q" is the implication p → q: rain is the condition, cancellation the consequence. A claims both things happen, which is a conjunction, not a conditional. C is the converse: it says a canceled trip means it rained, which the sentence never promises. D is the biconditional, which would also require that the trip is canceled only if it rains, and a trip can be canceled for other reasons.
An employee is suspected of leaking data. Which evidence-gathering method is both legal and ethical?
A. A coworker guesses the employee's password and copies files to a USB drive
B. An investigator installs a keylogger on the employee's personal home computer without a warrant
C. The company's IT team images the work computer under a documented acceptable-use policy and records a chain of custody
D. The files are posted to a public forum so volunteers can help search them
What is C?
An employer-owned device, a policy the employee agreed to, and a documented chain of custody are what make evidence both admissible and ethically collected. A is unauthorized access even when the intent is good. B crosses from a company-owned device to a private one, where the employer has no authority and a warrant would be required. D destroys confidentiality and the chain of custody at once. The gray areas the exam expects you to recognize sit between C and B: personal devices used for work, and policies that were never clearly communicated.
A robot follows a black line on a white surface using two light sensors, one on each side of the line. The left sensor begins reading dark while the right reads light. What should the algorithm do?
A. Turn right, by slowing the right motor
B. Stop and wait for both sensors to read light
C. Reverse until both sensors read dark
D. Turn left, by slowing the left motor or speeding up the right
What is D?
The two sensors straddle the line, so both read light when the robot is centered. When the left sensor reads dark, the line is under the left side of the robot: the robot has drifted to the right of the line. Steering left (slow the left motor or speed up the right) brings the line back between the sensors. A turns right, away from the line. B stops a robot that is off course; both sensors reading light is the normal state, not something to wait for. C reverses the goal: both sensors reading dark would mean the robot is sitting across the line.
In most 2D game frameworks, where is the origin (0, 0) of the screen's coordinate system, and in which direction does y increase?
A. Top-left corner; y increases downward
B. Center of the screen; y increases upward
C. Bottom-left corner; y increases upward
D. Top-right corner; y increases downward
What is A?
Screen coordinates follow the order pixels are drawn, from the top row down, so the origin sits at the top-left and y grows toward the bottom of the screen. That is the opposite of the math-class convention, and it is why a student's "jump" code often moves the character down. B is a world or camera space some engines offer, not screen space. C is the math convention. D is used by no common framework. Colors on that screen are mixed additively as RGB, where full red, green, and blue together produce white.
A program checks the following condition:
IF (NOT (age < 18))
Which condition is equivalent and easier to read?
A. age ≥ 18
B. age > 18
C. age ≤ 18
D. age = 18
What is A?
The negation of "less than" is "greater than or equal to," because the boundary value 18 flips sides. B drops 18 itself, so an 18-year-old would be treated as under 18. C is the negation of age > 18, not of age < 18. D keeps only the boundary. Rewriting a negated comparison as its complement is one of the simplest ways to improve existing code, and it is the same boundary reasoning that produces off-by-one errors in loops.
For the implication p → q, which row of the truth table is the only one that evaluates to false?
A. p true, q true
B. p false, q true
C. p true, q false
D. p false, q false
What is C?
An implication is a promise about what happens when p holds. It breaks only when the condition is met and the result does not follow: p true, q false. A is the promise kept. B and D are the rows candidates most often mark wrong: when p is false, the promise was never tested, so the implication is vacuously true. This is the same reason a loop guard that is never entered cannot fail.
Before examining a seized hard drive, an investigator attaches a write-blocker, creates a bit-for-bit image, and records a SHA-256 hash of both the original and the image. What is the purpose of the hash?
A. To compress the image so it takes less storage space
B. To prove the evidence was not altered between seizure and analysis
C. To decrypt files that were protected by a password
D. To speed up keyword searches across the image
What is B?
A hash is a fingerprint: any change to the data, even one bit, produces a different hash. Matching hashes on the original and the image, recomputed after analysis, show that the examiner worked on an exact copy and changed nothing. The write-blocker prevents accidental writes to the original for the same reason. A confuses hashing with compression; a hash is fixed-length and cannot be reversed to recover the data. C is a separate task that hashing does not perform. D is the job of an index, not a hash.
A robot is supposed to stop 20 cm from a wall but keeps driving into it. Here is the code:
distance ← readUltrasonic()
REPEAT UNTIL (distance ≤ 20)
moveForward()
stopMotors()What is the fix?
A. Increase the motor speed so the robot reaches the wall sooner
B. Change the condition to distance > 20
C. Move the readUltrasonic() call inside the loop so distance updates on every iteration
D. Replace the REPEAT UNTIL loop with an IF statement
What is C?
The variable is set once, before the loop, so the condition never changes and the loop never ends. Sensor readings must be refreshed each time the condition is checked. A makes the crash faster. B inverts the logic so the loop ends immediately and the robot never moves. D runs the body at most once and stops regardless of distance. This is a Competency 005 skill, reading and correcting existing code, applied to a robotics context.
Before installing an app on a physical phone, a developer tests it in software that imitates the device's screen size, touch input, and operating system. What is this tool, and what is one limitation?
A. A compiler; it cannot catch runtime errors
B. An emulator or simulator; it may not reproduce the real device's performance, sensors, or battery behavior
C. A debugger; it can only run one line at a time
D. Version control; it cannot show the user interface
What is B?
An emulator or simulator runs the app on a desktop while imitating the target device, which lets a class test on many screen sizes without owning many phones. It is still an imitation: GPS, accelerometer, camera, cellular behavior, and real-world performance differ from the device, so a final test on hardware is part of the development process. A, C, and D each name a real development tool that does a different job.
Trace this robot program. What does it print?
int steps ← 0
int d ← 50
while (d > 20)
moveForward(10)
d ← d - 10
steps ← steps + 1
end while
print stepsA. 4
B. 5
C. 2
D. 3
What is D?
The condition is checked before each pass. d goes 50 to 40 (steps 1), 40 to 30 (steps 2), 30 to 20 (steps 3). Now d > 20 is false, so the loop exits without a fourth pass. A assumes the loop runs once more when d equals 20, which would need d >= 20. B counts from 50 down to 0. C stops one pass early.
A program checks the following condition:
IF (NOT (x > 5 AND y < 3))
By De Morgan's laws, which condition is equivalent?
A. x ≤ 5 AND y ≥ 3
B. x ≤ 5 OR y ≥ 3
C. x > 5 OR y < 3
D. NOT (x ≤ 5 OR y ≥ 3)
What is B?
De Morgan's laws: negating an AND gives an OR of the negations, and negating an OR gives an AND of the negations. Each comparison flips to its complement, so x > 5 becomes x ≤ 5 and y < 3 becomes y ≥ 3, joined by OR. A negates the pieces but keeps the AND, which is the most common error. C keeps the pieces and only changes the connective. D is the negation of the correct answer, which brings you back to the original condition.
Match each description to the type of malicious software: (1) a program that appears useful but carries hidden malicious code, (2) a program that copies itself across a network without any user action, (3) software that hides its presence while holding administrator-level control of the system.
A. Worm, Trojan, rootkit
B. Virus, rootkit, phishing
C. Rootkit, worm, virus
D. Trojan, worm, rootkit
What is D?
A Trojan is named for the disguise: the user installs it believing it is legitimate. A worm spreads on its own, which is what separates it from a virus, which needs a host file or a user action to propagate. A rootkit's defining feature is concealment at a privileged level. A swaps the first two. B uses virus for the disguised program and lists phishing, which is a social-engineering attack delivered by email or a fake site, not software at all. C assigns the hidden-control description to a virus.
A team's line-following robot completes the course in 4 of 10 trials. The design log shows that every failure happens at the sharpest curve, where the robot runs at full speed and reads its sensors only once per loop. Which response best follows the engineering design process?
A. Lower the speed on curves and double the sensor sampling rate in the same build, then run 10 more trials
B. Lower the speed, keep everything else the same, run the same 10 trials, record the results, then decide the next change
C. Replace the two light sensors with a camera, since the current sensors clearly cannot handle curves
D. Run 50 more trials with no changes to see whether 4 of 10 was bad luck
What is B?
Refining means changing one variable, retesting under the same conditions, and documenting the result so the team knows what caused any improvement. A changes two things at once, so a better score cannot be attributed to either. C jumps to a new design without evaluating the data the log already holds. D collects more of the same data instead of acting on a clear pattern. Note the trap in A: both of its changes are reasonable; the error is making them together.
A mobile game should make the character jump when the player taps the screen. Which approach fits an event-driven program?
A. Check for a tap on every line of code in the program
B. Ask the player at startup whether they plan to tap
C. Call jump() on a timer every two seconds
D. Register an event handler (listener) for the tap event that calls jump() when the event fires
What is D?
Event-driven programming means the program waits, and code runs in response to events such as taps, key presses, timers, and collisions. The handler is registered once and the framework invokes it whenever the event occurs; the game loop keeps drawing frames in between. A describes polling everywhere, which is both unworkable and not event-driven. B and C ignore the player's input entirely.
Using 4-bit values, what are 1100 AND 1010, 1100 OR 1010, and 1100 XOR 1010, in that order?
A. 1000, 1110, 0110
B. 1110, 1000, 0110
C. 1000, 0110, 1110
D. 0110, 1110, 1000
What is A?
Bitwise operators work column by column. AND keeps a 1 only where both inputs have a 1: just the leftmost bit, 1000. OR keeps a 1 where either input has a 1: 1110. XOR keeps a 1 where the inputs differ: the middle two bits, 0110. B swaps AND and OR. C swaps OR and XOR. D rotates all three. These are the same truth tables as the logical operators in Competency 010, applied to each bit position.
A club of 8 students elects a president and a vice president (two different roles), and separately chooses a 2-person committee. How many ways can each be done?
Note: The president and vice president can be considered for the committee.
A. 56 and 56
B. 28 and 28
C. 56 and 28
D. 64 and 16
What is C?
The officer slate is ordered (president, then vice president), so it is a permutation: P(8, 2) = 8 × 7 = 56. The committee is unordered, so it is a combination: C(8, 2) = 56 / 2 = 28, since each pair was counted twice in the permutation count. A treats the committee as ordered. B treats the officers as interchangeable. D uses 8 × 8 and 4 × 4, which allow the same person to be chosen twice.
An investigator responding to a phishing incident must (1) analyze the network traffic captured during the attack and (2) recover deleted files from the victim's storage drive. Which pairing names the right tool type for each task, and what should be captured first when the machine is still running?
A. A packet analyzer for the traffic; a disk-imaging and file-recovery toolkit for the drive; capture RAM before powering down
B. A disk-imaging toolkit for the traffic; a packet analyzer for the drive; power down first to preserve everything
C. Antivirus software for both tasks; reboot first so the system is clean
D. A password-cracking tool for both tasks; capture the drive image first
What is A?
Network traffic is analyzed as packets, so the tool is a packet analyzer. Deleted files live in unallocated space on the drive, which a disk-imaging and file-recovery toolkit can read back. The order matters because of volatility: RAM holds running processes, open connections, and sometimes decryption keys, and it is gone the moment the power is cut, so it is captured first. B reverses the tools and loses the volatile evidence. C uses a cleanup tool that would alter or destroy evidence. D names a tool for a task that was never asked for.
A class uses simulation software to test a robot's obstacle-avoidance program before loading it onto hardware. Which statement correctly describes a benefit and a limitation of this approach?
A. Benefit: the simulation is always exact; limitation: it requires more hardware than a physical test
B. Benefit: algorithms can be tested quickly and safely without hardware; limitation: the simulation may not reproduce real sensor noise, friction, or battery variation
C. Benefit: the simulator replaces the need for sensors on the real robot; limitation: it runs slower than hardware
D. Benefit: students can skip writing code; limitation: the robot cannot be tested afterward
What is B?
Simulation lets students iterate on logic without waiting for a build, breaking parts, or needing one robot per group. The cost is fidelity: a simulated ultrasonic sensor returns clean numbers, while a real one returns noise, echoes, and dropouts, which is why a program that passes in simulation can still fail on the floor. A and C each claim the simulator is more accurate or more capable than the hardware, which reverses the limitation. D describes neither a benefit nor a limitation of simulation.
A game represents two objects as circles with centers (x1, y1) and (x2, y2) and radii r1 and r2. Which condition detects a collision?
A. The distance between the centers is greater than or equal to r1 + r2
B. x1 equals x2
C. The distance between the centers is less than or equal to r1 + r2
D. The distance between the centers is less than or equal to r1 minus r2
What is C?
Two circles touch or overlap when their centers are no farther apart than the sum of their radii; the distance comes from the Pythagorean theorem, sqrt((x2 - x1)^2 + (y2 - y1)^2). In code, comparing the squared distance to (r1 + r2)^2 avoids the square root. A is the condition for not colliding. B ignores the vertical axis and the sizes entirely. D is the condition for one circle being fully inside the other, which is a containment test, not a collision test. The same idea with rectangles is axis-aligned bounding-box collision, where the boxes overlap on both axes at once.
A game checks every pair of its n objects for a collision using a nested loop. With 100 objects, how many pair checks are made, and what is the time complexity?
A. 100 and O(n)
B. 10,000 and O(n²)
C. 4,950 and O(n²)
D. 4,950 and O(n log n)
What is C?
The number of unordered pairs is C(100, 2) = 100 × 99 / 2 = 4,950, the same combination formula from the Discrete Math 500. The count grows with n², so the complexity is quadratic. A treats the check as one pass over the objects. B counts every ordered pair plus each object against itself (100 × 100), which is what a careless nested loop does when the inner loop starts at 0 instead of i + 1. D has the right count but the wrong growth rate; n log n is what you get after a spatial partition such as a grid or quadtree, which is the standard fix when the brute-force check becomes too slow.