TExES Computer Science 8-12 (241)
TExES Computer Science 8-12 (241) is a trademark of its owner, which is not affiliated with and does not endorse Test Treasure Publication or TTP Prep.
TExES Computer Science 8-12 (241) is a trademark of its owner, which is not affiliated with and does not endorse Test Treasure Publication or TTP Prep.
10 sample questions for the TExES Computer Science 8-12 (241), with the correct answer and an explanation for each. No account needed. Try each one before you open the answer.
Sections covered on the exam: Technology Applications Core, Program Design and Development, Programming Language Topics, Specialized Topics.
Question 1 · Technology Applications Core
Answer: B. 1,440,000 bytes
The image has 800 × 600 = 480,000 pixels, and 24-bit color uses 3 bytes per pixel, so 480,000 × 3 = 1,440,000 bytes. The value 11,520,000 is the size in bits (480,000 × 24) mistakenly labeled as bytes; 1,920,000 bytes would correspond to 32-bit color.
Question 2 · Program Design and Development
Answer: B. [1, 4, 7, 9, 6]
Pass 1 inserts 4 to give [4, 7, 9, 1, 6]; pass 2 inserts 9, which stays put; pass 3 inserts 1 at the front to give [1, 4, 7, 9, 6]. The array [1, 4, 9, 7, 6] is what selection sort produces after two passes, and [4, 7, 9, 1, 6] is the state after only two insertion passes.
Question 3 · Program Design and Development
Answer: A. 13
fire runs the handlers in the order they were registered, passing each result to the next: 4 + 3 = 7, 7 × 2 = 14, and 14 − 1 = 13. Answering 14 stops before the last handler runs, and 9 applies the handlers in reverse order (4 − 1 = 3, 3 × 2 = 6, 6 + 3 = 9).
Question 4 · Programming Language Topics
Answer: D. 5 False True True
For r, pos(-1) is False, so pos(2) is skipped (1 call). For s, pos(3) is True, so pos(-4) is skipped (2 calls). For t, pos(5) and pos(-6) give False, so pos(7) is evaluated and returns True (5 calls total). Choosing 7 assumes every call runs, ignoring short-circuiting.
Question 5 · Programming Language Topics
Answer: B. O(n²)
The innermost loop always runs a constant 10 times. The middle loop runs i times, so the total count is 10(1 + 2 + ... + n) = 10 · n(n + 1)/2, which is O(n²). Choosing O(n³) counts three nested loops without noticing that one of them has a fixed bound.
Question 6 · Technology Applications Core
Answer: B. 254
A /24 prefix leaves 8 host bits, giving 2^8 = 256 addresses; the all-zeros network address and the all-ones broadcast address cannot be assigned, leaving 254. The answer 256 forgets those two reserved addresses, and 65,534 is the count for a /16 network.
Question 7 · Program Design and Development
Start. Set total to 0 and k to 1. Decision: is k > 10? If yes, output total and stop. If no, check whether k mod 3 = 0; if so, add k to total. Then add 2 to k and return to the decision.
Answer: A. 12
k takes the values 1, 3, 5, 7, and 9, and the loop stops when k becomes 11. Only 3 and 9 are divisible by 3, so total = 3 + 9 = 12. Answering 18 adds 3, 6, and 9, which assumes k increases by 1; answering 25 adds every odd value of k without applying the divisibility test.
Question 8 · Program Design and Development
Answer: C. ['save', 'beep', 'beep']
The first click calls both listeners in registration order, appending 'save' then 'beep'. pop(0) removes the first listener (the save callback), so the second click calls only the beep listener, giving ['save', 'beep', 'beep']. Answering ['save', 'beep', 'save'] assumes pop(0) removed the most recently added listener.
Question 9 · Programming Language Topics
Answer: A. (count ≠ 0) AND (total / count > 50)
Placing count ≠ 0 first means that when count is 0, the AND is already false and the division is never evaluated. Reversing the order evaluates the division first and fails when count is 0. Testing count = 0 first with AND forces the division exactly when count is 0, and the OR version divides first.
Question 10 · Programming Language Topics
Answer: B. O(n log n)
The outer loop doubles i (1, 2, 4, ...) until it reaches n, so it runs about log₂ n times. The inner loop runs n times on every outer pass regardless of i, giving about n · log₂ n operations, which is O(n log n). Choosing O(n²) treats both loops as linear without noticing the doubling update.
TTP Prep has 200 TExES Computer Sci 241 practice questions with explanations, timed and mock-exam modes, 158 flashcards, interactive lessons, a printable cheat sheet and a readiness score. Start free, no card needed.
More free questions: browse every exam.