17. UT AUSTIN INTRODUCTION
TO COMPUTER SCIENCE
MIDTERM EXAM 2026
146 Questions with Answers and Detailed Rationales
100 PERCENT GUARANTEED PASS
INSTANT DOWNLOAD ANSWERS INCLUDED
IMPORTANCE OF THIS DOCUMENT
This comprehensive examination preparation guide has been meticulously developed to help you succeed in the
17. UT AUSTIN INTRODUCTION TO COMPUTER SCIENCE MIDTERM EXAM 2026. It contains 146 carefully
selected questions that reflect the most current exam content and testing strategies. Each question is
accompanied by a correct answer and a detailed rationale that explains the underlying pathophysiology,
pharmacology, or clinical reasoning.
Self-Assessment – Test your knowledge and Exam Preparation – Familiarize yourself with the
identify areas requiring further question format and content
study areas
Concept Reinforcement – Deepen your Confidence Building – Develop test-taking
understanding through strategies and reduce
evidence-based exam anxiety
rationales
Time Management – Practice answering
questions under simulated
exam conditions
Review Summary 146 Questions
Foundations - Application - 17 UT Austin Introduction TO Computer Science 2026 Computer Science
Introduction TO Computer Science / Programming Foundations Undergraduate Lower-division Introductory
CS R1 University Standard
All answers with rationales
,Table of Contents
Content Area Questions Key Topics
Programming Fundamentals 1-25 Value, Expression, Binary, Result, Decimal
AND Python Basics
Control FLOW Conditionals 26-50 Expression, Range, Python, Describes, Condition
AND Loops
Functions AND Modular 51-75 Binary, Function, Search, Table, Program
Design
DATA Structures Lists Tuples 76-100 Binary, Python, Return, Search, Array
Strings AND Dictionaries
FILE Input/output AND DATA 101-125 Python, Function, Table, Expression, Print
Processing
Object-oriented 126-146 Value, Return, Python, Function, Result
Programming Classes AND
Objects
TOTAL 146 All questions include answers and detailed rationales
,Section A - Programming Fundamentals AND Python
Basics
Q1.
An 8-bit two's complement system stores the decimal value 37. Which binary pattern is
stored?
A. 11011010 B. 11011011
C. 10100101 D. 00100101
Correct: B - 11011011
Rationale:Positive 37 is 00100101. Invert bits to get 11011010, then add 1 to obtain
11011011, which represents 37 in 8-bit two's complement. Option A is the one's complement
(which equals 38 in two's complement), and C/D are sign-magnitude or incorrect patterns.
Why the other answers are wrong:
A. This is the one's complement of +37, which represents 38, not 37, in two's complement.
C. This pattern is not the two's complement of +37; it does not yield 37 when negated and
added.
D. This is the binary representation of positive 37, not the negative value.
Reference: Bryant & O'Hallaron, Computer Systems: A Programmer's Perspective, 3rd Ed., Ch. 2
(Integer Representations)
Q2.
Given the Boolean expression NOT (p AND q) OR (p AND NOT q), which simplified
expression is logically equivalent?
A. NOT p B. NOT q OR p
C. p OR NOT q D. NOT p OR NOT q
Correct: D - NOT p OR NOT q
Rationale:By De Morgan's law, NOT(p AND q) = NOT p OR NOT q. Since NOT p OR NOT q
already subsumes the second disjunct (p AND NOT q) - because whenever p is true the
second term requires NOT q, which is already covered - the whole expression simplifies to
NOT p OR NOT q. Truth-table verification confirms this equivalence.
Why the other answers are wrong:
A. NOT p is too strong; the expression is true when p is true and q is false.
B. This fails when p is true and q is true (expression should be false, but NOT q OR p is true).
C. This fails when p is false and q is true (expression should be true, but p OR NOT q is false).
Reference: Rosen, K.H., Discrete Mathematics and Its Applications, 8th Ed., Sec. 1.2 (Propositional
Page 3
, Section A - Programming Fundamentals AND Python Basics
Equivalences)
Q3.
What is printed by the following Python code?
s = "comp sci"
result = ""
for ch in s:
if ch != " ":
result = ch + result
print(result)
A. ics pmoc B. icspmoc
C. comp sci D. cs pmoc
Correct: B - icspmoc
Rationale:The loop prepends each non-space character to result, reversing the string while
skipping the space. The characters collected are c,o,m,p,s,c,i, producing 'icspmoc'. Option A
retains a space incorrectly; C is the original string; D omits characters.
Why the other answers are wrong:
A. The space is excluded by the if condition, so no space appears in the output.
C. The original string is not reversed or filtered in this way.
D. Characters 'o' and 'm' are omitted, which the loop does not do.
Reference: Downey, A., Think Python, 3rd Ed., Ch. 8 (Strings and Traversal)
Q4.
An algorithm processes an input of size n and its running time satisfies T(n) = 3n² + 500n
+ 2000. Which statement best characterizes its asymptotic complexity?
A. (n) because the linear term dominates for B. O(n²) but not (n²)
small n
C. (n²) because the n² term dominates D. (n³) because of the three nested
asymptotically operations implied by 3n²
Correct: C - (n²) because the n² term dominates asymptotically
Rationale:In asymptotic analysis, the highest-order term (n²) dominates as n grows, so T(n)
= (n²). Coefficients and lower-order terms are ignored. The other options misapply asymptotic
definitions or misinterpret the coefficient 3.
Why the other answers are wrong:
A. Linear terms never dominate quadratic terms for large n; small-n behavior is irrelevant to
asymptotic class.
Page 4
TO COMPUTER SCIENCE
MIDTERM EXAM 2026
146 Questions with Answers and Detailed Rationales
100 PERCENT GUARANTEED PASS
INSTANT DOWNLOAD ANSWERS INCLUDED
IMPORTANCE OF THIS DOCUMENT
This comprehensive examination preparation guide has been meticulously developed to help you succeed in the
17. UT AUSTIN INTRODUCTION TO COMPUTER SCIENCE MIDTERM EXAM 2026. It contains 146 carefully
selected questions that reflect the most current exam content and testing strategies. Each question is
accompanied by a correct answer and a detailed rationale that explains the underlying pathophysiology,
pharmacology, or clinical reasoning.
Self-Assessment – Test your knowledge and Exam Preparation – Familiarize yourself with the
identify areas requiring further question format and content
study areas
Concept Reinforcement – Deepen your Confidence Building – Develop test-taking
understanding through strategies and reduce
evidence-based exam anxiety
rationales
Time Management – Practice answering
questions under simulated
exam conditions
Review Summary 146 Questions
Foundations - Application - 17 UT Austin Introduction TO Computer Science 2026 Computer Science
Introduction TO Computer Science / Programming Foundations Undergraduate Lower-division Introductory
CS R1 University Standard
All answers with rationales
,Table of Contents
Content Area Questions Key Topics
Programming Fundamentals 1-25 Value, Expression, Binary, Result, Decimal
AND Python Basics
Control FLOW Conditionals 26-50 Expression, Range, Python, Describes, Condition
AND Loops
Functions AND Modular 51-75 Binary, Function, Search, Table, Program
Design
DATA Structures Lists Tuples 76-100 Binary, Python, Return, Search, Array
Strings AND Dictionaries
FILE Input/output AND DATA 101-125 Python, Function, Table, Expression, Print
Processing
Object-oriented 126-146 Value, Return, Python, Function, Result
Programming Classes AND
Objects
TOTAL 146 All questions include answers and detailed rationales
,Section A - Programming Fundamentals AND Python
Basics
Q1.
An 8-bit two's complement system stores the decimal value 37. Which binary pattern is
stored?
A. 11011010 B. 11011011
C. 10100101 D. 00100101
Correct: B - 11011011
Rationale:Positive 37 is 00100101. Invert bits to get 11011010, then add 1 to obtain
11011011, which represents 37 in 8-bit two's complement. Option A is the one's complement
(which equals 38 in two's complement), and C/D are sign-magnitude or incorrect patterns.
Why the other answers are wrong:
A. This is the one's complement of +37, which represents 38, not 37, in two's complement.
C. This pattern is not the two's complement of +37; it does not yield 37 when negated and
added.
D. This is the binary representation of positive 37, not the negative value.
Reference: Bryant & O'Hallaron, Computer Systems: A Programmer's Perspective, 3rd Ed., Ch. 2
(Integer Representations)
Q2.
Given the Boolean expression NOT (p AND q) OR (p AND NOT q), which simplified
expression is logically equivalent?
A. NOT p B. NOT q OR p
C. p OR NOT q D. NOT p OR NOT q
Correct: D - NOT p OR NOT q
Rationale:By De Morgan's law, NOT(p AND q) = NOT p OR NOT q. Since NOT p OR NOT q
already subsumes the second disjunct (p AND NOT q) - because whenever p is true the
second term requires NOT q, which is already covered - the whole expression simplifies to
NOT p OR NOT q. Truth-table verification confirms this equivalence.
Why the other answers are wrong:
A. NOT p is too strong; the expression is true when p is true and q is false.
B. This fails when p is true and q is true (expression should be false, but NOT q OR p is true).
C. This fails when p is false and q is true (expression should be true, but p OR NOT q is false).
Reference: Rosen, K.H., Discrete Mathematics and Its Applications, 8th Ed., Sec. 1.2 (Propositional
Page 3
, Section A - Programming Fundamentals AND Python Basics
Equivalences)
Q3.
What is printed by the following Python code?
s = "comp sci"
result = ""
for ch in s:
if ch != " ":
result = ch + result
print(result)
A. ics pmoc B. icspmoc
C. comp sci D. cs pmoc
Correct: B - icspmoc
Rationale:The loop prepends each non-space character to result, reversing the string while
skipping the space. The characters collected are c,o,m,p,s,c,i, producing 'icspmoc'. Option A
retains a space incorrectly; C is the original string; D omits characters.
Why the other answers are wrong:
A. The space is excluded by the if condition, so no space appears in the output.
C. The original string is not reversed or filtered in this way.
D. Characters 'o' and 'm' are omitted, which the loop does not do.
Reference: Downey, A., Think Python, 3rd Ed., Ch. 8 (Strings and Traversal)
Q4.
An algorithm processes an input of size n and its running time satisfies T(n) = 3n² + 500n
+ 2000. Which statement best characterizes its asymptotic complexity?
A. (n) because the linear term dominates for B. O(n²) but not (n²)
small n
C. (n²) because the n² term dominates D. (n³) because of the three nested
asymptotically operations implied by 3n²
Correct: C - (n²) because the n² term dominates asymptotically
Rationale:In asymptotic analysis, the highest-order term (n²) dominates as n grows, so T(n)
= (n²). Coefficients and lower-order terms are ignored. The other options misapply asymptotic
definitions or misinterpret the coefficient 3.
Why the other answers are wrong:
A. Linear terms never dominate quadratic terms for large n; small-n behavior is irrelevant to
asymptotic class.
Page 4