• 48 questions

TExES Computer Science Practice Test

Unofficial practice for TExES 241: program design, Java, algorithms and discrete math, with the source under every answer.

A school links the computers, printers and tablets in one building so that any device can reach any other. Which kind of network is this?

Pick an answer, then press Check answer. Then you see Correct or Not quite, with the reason. Keys: A to D pick, Enter checks.

Print covers the next 48 questions. Share this set copies a link to the same questions in the same order.

Exam mode: 48 questions, 137 minutes.

More options

Unofficial practice questions, not affiliated with the Texas Education Agency or Pearson. Bank checked October 8, 2026.

All 48 questions

Technology applications core 6

  • A free game that a student downloads plays as promised, but it also quietly copies the passwords saved on the laptop. Which term fits the game? NIST Computer Security Resource Center glossary, Trojan horse. Written to TExES Computer Science 8–12 (241) Domain I, competency 001
  • A message that looks as if it came from the district help desk asks teachers to open a link and type their passwords. What is this attack called? Cybersecurity and Infrastructure Security Agency, Recognize and Report Phishing. Written to TExES Computer Science 8–12 (241) Domain I, competency 001
  • A photograph is published under the Creative Commons license CC BY-NC. What may a class do with it? Creative Commons, About CC Licenses. Written to TExES Computer Science 8–12 (241) Domain I, competency 001
  • A school links the computers, printers and tablets in one building so that any device can reach any other. Which kind of network is this? NIST Computer Security Resource Center glossary, local area network. Written to TExES Computer Science 8–12 (241) Domain I, competency 001
  • A student describes an idea for a new kind of scheduling app in a written report. What does U.S. copyright protect? U.S. Copyright Office, Frequently Asked Questions: What Does Copyright Protect?. Written to TExES Computer Science 8–12 (241) Domain I, competency 001
  • In the free software definition published by the GNU Project, what does the word "free" refer to? GNU Project, What is Free Software? The Free Software Definition. Written to TExES Computer Science 8–12 (241) Domain I, competency 001
Show all 48 questions (42 more)

Program design and development 17

  • A designer splits a large problem into smaller instances, solves each of them in the same way, and combines the answers. Which strategy is this? NIST Dictionary of Algorithms and Data Structures, divide and conquer. Written to TExES Computer Science 8–12 (241) Domain II, competency 004
  • A Java method opens a file inside a try block and closes it inside a finally block. When does the finally block run? The Java Tutorials (Oracle), The finally Block. Written to TExES Computer Science 8–12 (241) Domain II, competency 005
  • A programmer wants a running program to pause at one line so that she can step through the next statements and look at the variables. Which IDE feature does this? Python documentation, IDLE: Python editor and shell. Written to TExES Computer Science 8–12 (241) Domain II, competency 005
  • A set of data values and associated operations that are precisely specified independent of any particular implementation is called what? NIST Dictionary of Algorithms and Data Structures, abstract data type. Written to TExES Computer Science 8–12 (241) Domain II, competency 006
  • A team draws class diagrams and sequence diagrams in UML before it writes code. What is the Unified Modeling Language? Object Management Group, About the Unified Modeling Language Specification, version 2.5.1. Written to TExES Computer Science 8–12 (241) Domain II, competency 004
  • A tester feeds a finished module a set of inputs and checks the outputs against the specification, without reading the code. What is this approach called? NIST Computer Security Resource Center glossary, black box testing. Written to TExES Computer Science 8–12 (241) Domain II, competency 004
  • According to the glossary of the Python documentation, how do interpreted languages typically compare with compiled ones? Python documentation, Glossary. Written to TExES Computer Science 8–12 (241) Domain II, competency 006
  • According to the principles behind the Agile Manifesto, what is the primary measure of progress? Principles behind the Agile Manifesto. Written to TExES Computer Science 8–12 (241) Domain II, competency 004
  • By the naming convention in the Java Tutorials, how is a constant that stores a bicycle's number of gears written? The Java Tutorials (Oracle), Variables. Written to TExES Computer Science 8–12 (241) Domain II, competency 005
  • In Java source code, which form of comment does the javadoc tool use to prepare generated documentation? The Java Tutorials (Oracle), A Closer Look at the "Hello World!" Application. Written to TExES Computer Science 8–12 (241) Domain II, competency 005
  • PEP 8, the style guide for Python code, gives which reason for its rules on layout and naming? Python Enhancement Proposal 8, Style Guide for Python Code. Written to TExES Computer Science 8–12 (241) Domain II, competency 005
  • The Python statement print(10 * (1 / 0)) is syntactically correct but fails when it runs. What does the Python tutorial call an error detected during execution? Python Tutorial, 8. Errors and Exceptions. Written to TExES Computer Science 8–12 (241) Domain II, competency 005
  • What does the javac compiler produce from a .java source file? The Java Tutorials (Oracle), About the Java Technology. Written to TExES Computer Science 8–12 (241) Domain II, competency 006
  • What is the name for programs and data kept in hardware, usually read-only memory, so that nothing can rewrite or alter them while they run? NIST Computer Security Resource Center glossary, firmware. Written to TExES Computer Science 8–12 (241) Domain II, competency 006
  • Which pairing is one of the four values stated in the Agile Manifesto? Manifesto for Agile Software Development. Written to TExES Computer Science 8–12 (241) Domain II, competency 004
  • Which phrase is the NIST glossary's definition of a software development life cycle? NIST Computer Security Resource Center glossary, software development life cycle. Written to TExES Computer Science 8–12 (241) Domain II, competency 004
  • Which term does the NIST dictionary define as "a computable set of steps to achieve a desired result"? NIST Dictionary of Algorithms and Data Structures, algorithm. Written to TExES Computer Science 8–12 (241) Domain II, competency 006

Programming language topics 19

  • A class keeps its fields private and lets other code change them only through its methods. Which principle of object-oriented programming is this? The Java Tutorials (Oracle), What Is an Object?. Written to TExES Computer Science 8–12 (241) Domain III, competency 008
  • A Java array is created to hold 10 values. Which statement about it is correct? The Java Tutorials (Oracle), Arrays. Written to TExES Computer Science 8–12 (241) Domain III, competency 007
  • A Java method receives an int argument and assigns a new value to that parameter. What happens to the caller's variable when the method returns? The Java Tutorials (Oracle), Passing Information to a Method or a Constructor. Written to TExES Computer Science 8–12 (241) Domain III, competency 007
  • A subclass declares an instance method with the same name, parameters and return type as a method of its superclass. What has the subclass done? The Java Tutorials (Oracle), Overriding and Hiding Methods. Written to TExES Computer Science 8–12 (241) Domain III, competency 008
  • After the Java statements int a = 5; int b = a++; run, what are the values of a and b? The Java Tutorials (Oracle), Assignment, Arithmetic, and Unary Operators. Written to TExES Computer Science 8–12 (241) Domain III, competency 008
  • An algorithm takes n² + 3n + 4 steps for a problem of size n. How is its growth written in big-O notation? NIST Dictionary of Algorithms and Data Structures, big-O notation. Written to TExES Computer Science 8–12 (241) Domain III, competency 009
  • Both operands are of type int. What are the values of the Java expressions 17 / 5 and 17 % 5? The Java Language Specification, Java SE 21 Edition, Chapter 15: Expressions (15.17 Multiplicative Operators). Written to TExES Computer Science 8–12 (241) Domain III, competency 008
  • How does a Java do-while loop differ from a while loop? The Java Tutorials (Oracle), The while and do-while Statements. Written to TExES Computer Science 8–12 (241) Domain III, competency 008
  • In a recursive function, what is the base case? NIST Dictionary of Algorithms and Data Structures, recursion. Written to TExES Computer Science 8–12 (241) Domain III, competency 009
  • In Java source code, what does the prefix in the literal 0x1a indicate, and what is the value in decimal? The Java Tutorials (Oracle), Primitive Data Types. Written to TExES Computer Science 8–12 (241) Domain III, competency 007
  • In Java, what does the expression "computer".substring(3, 6) return? The Java Tutorials (Oracle), Manipulating Characters in a String. Written to TExES Computer Science 8–12 (241) Domain III, competency 007
  • In the Java condition (n != 0) && (total / n > 2), what happens when n is 0? The Java Tutorials (Oracle), Equality, Relational, and Conditional Operators. Written to TExES Computer Science 8–12 (241) Domain III, competency 008
  • In what order does an in-order traversal process the parts of a binary tree? NIST Dictionary of Algorithms and Data Structures, in-order traversal. Written to TExES Computer Science 8–12 (241) Domain III, competency 007
  • The values A, B and C are pushed onto an empty stack in that order. Which value does the first pop remove? NIST Dictionary of Algorithms and Data Structures, stack. Written to TExES Computer Science 8–12 (241) Domain III, competency 007
  • What must be true of an array before a binary search can be used on it? NIST Dictionary of Algorithms and Data Structures, binary search. Written to TExES Computer Science 8–12 (241) Domain III, competency 009
  • Which Java primitive data type is an 8-bit signed integer with -128 as its minimum value and 127 as its maximum? The Java Tutorials (Oracle), Primitive Data Types. Written to TExES Computer Science 8–12 (241) Domain III, competency 007
  • Which sorting algorithm repeatedly searches the remaining items to find the least one and moves it to its final location? NIST Dictionary of Algorithms and Data Structures, selection sort. Written to TExES Computer Science 8–12 (241) Domain III, competency 009
  • Which statement about classes and interfaces in Java is correct? The Java Tutorials (Oracle), Abstract Methods and Classes. Written to TExES Computer Science 8–12 (241) Domain III, competency 008
  • Which statement about the running time of quicksort matches the NIST dictionary? NIST Dictionary of Algorithms and Data Structures, quicksort. Written to TExES Computer Science 8–12 (241) Domain III, competency 009

Specialized topics 6

  • A classroom robot must stop when it bumps into a wall. Which sensor tells the robot that it has run into something? TeachEngineering (University of Colorado Boulder), lesson What Is a Sensor?. Written to TExES Computer Science 8–12 (241) Domain IV, competency 012
  • A game runs a block of code each time the player presses a key. In event-driven programming, what is that block of code called? MDN Web Docs, Introduction to events. Written to TExES Computer Science 8–12 (241) Domain IV, competency 013
  • By De Morgan's laws, the expression NOT (P OR Q) is equivalent to which of these? Wolfram MathWorld, de Morgan's Laws. Written to TExES Computer Science 8–12 (241) Domain IV, competency 010
  • How many combinations of two elements can be chosen from the set {1, 2, 3, 4} when order does not matter? Wolfram MathWorld, Combination. Written to TExES Computer Science 8–12 (241) Domain IV, competency 010
  • In 2D game programming, what is a hitbox? MDN Web Docs, 2D collision detection. Written to TExES Computer Science 8–12 (241) Domain IV, competency 013
  • Investigators record each person who handled a seized laptop, the date and time it changed hands, and the purpose of each transfer. What is this process called? NIST Computer Security Resource Center glossary, chain of custody. Written to TExES Computer Science 8–12 (241) Domain IV, competency 011

How this list was compiled: Our own questions, written to the exam framework of TExES Computer Science 8–12 (241) in Section 3 of the preparation manual on the Texas Educator Certification Examination Program website, https://www.tx.nesinc.com/Content/StudyGuide/TX_SG_obj_241.htm (copyright Texas Education Agency), read 2026-10-08: 100 selected-response questions in four domains, Technology Applications Core about 12.5%, Program Design and Development 35%, Programming Language Topics 40%, Specialized Topics 12.5%. This bank holds 48: 6, 17, 19 and 6. Every fact was read on the public page named under its question (47 pages, each opened 2026-10-08): the Java Tutorials and the Java Language Specification, the NIST Dictionary of Algorithms and Data Structures, the NIST computer security glossary, the Python documentation, Wolfram MathWorld, the Agile Manifesto, the Object Management Group, MDN Web Docs, the U.S. Copyright Office, Creative Commons, the GNU Project, CISA and TeachEngineering. Answers that are a value of an expression are worked from the rule the source gives. Licence: Questions, choices and explanations are original work of this site.

How it works

A free TExES Computer Science practice test for the 8–12 exam, code 241: 48 questions written for this site. It is unofficial and not affiliated with, endorsed by or sponsored by the Texas Education Agency or Pearson.

Read the full guide

What the four domains weigh

Programming Language Topics is about 40% of the exam and Program Design and Development 35%. Technology Applications Core and Specialized Topics (discrete mathematics, digital forensics, robotics, game and mobile development) take 12.5% each. This bank holds 19, 17, 6 and 6 questions, every one tagged with its competency.

Questions and clock

The real exam has 100 selected-response questions and 4 hours 45 minutes of testing time in a 5-hour appointment. Exam mode here runs 48 questions in 137 minutes, the same pace.

Where the answers come from

Code questions rest on Oracle's Java Tutorials and the Java Language Specification, algorithm questions on the NIST Dictionary of Algorithms and Data Structures. The page that was read is linked under each question.

  • The framework asks for coding proficiency in an object-oriented language. The code questions on this page are in Java, apart from one line of Python.

Questions and answers

Is there a free TExES Computer Science 241 study guide?

Yes. The preparation manual on the Texas Educator Certification Examination Program site costs nothing. Its Section 3 lists the four domains and all 13 competencies, and each question here names the competency it was written to.

What is on the TExES Computer Science 8-12 practice test?

Networks, licensing and security; the software life cycle, testing, style and debugging; Java data types, strings, arrays, operators, loops, classes and interfaces; searching, sorting, recursion and big-O; and logic, counting, forensics, robot sensors and game programming.

What score passes TExES 241?

The exam's own page gives a passing score of 240. Scores are scaled, so this page reports how many answers were right and makes no pass or fail call.

Are these the real TExES Computer Science 241 questions?

No. Each one was written for this site from a single competency and a single public source. Nothing is taken or reworded from the real exam or from the sample questions in the preparation manual.