

Introduction to Computer Science Test Questions
Course Introduction
Introduction to Computer Science offers a comprehensive overview of the fundamental concepts and principles underlying the field of computing. This course introduces students to core topics such as algorithms, programming languages, data structures, computer architecture, software development, and the societal impact of computing. Through hands-on programming exercises and problem-solving activities, students will develop practical skills in designing, writing, and debugging simple programs while gaining an appreciation for the broader scope and relevance of computer science in the modern world.
Recommended Textbook
Starting Out with Python 3rd Edition by Tony Gaddis
Available Study Resources on Quizplus
13 Chapters
488 Verified Questions
488 Flashcards
Source URL: https://quizplus.com/study-set/1057

Page 2

Chapter 1: Introduction to Computers and Programming
Available Study Resources on Quizplus for this Chatper
36 Verified Questions
36 Flashcards
Source URL: https://quizplus.com/quiz/20921
Sample Questions
Q1) A _____ has no moving parts, and operates faster than a traditional disk drive.
A) DVD drive
B) solid state drive
C) floppy disk
D) hyper drive
Answer: B
Q2) Which language from the following list is referred to as a low-level language?
A) C++
B) Assembly language
C) JAVA
D) Python
Answer: B
Q3) The _______________ is the part of a computer that actually runs programs and is the most important component in a computer.
Answer: central processing unit or CPU
Q4) The disadvantages of a(n) _______________ are that it only holds small amounts of data, is slow to access data, and can be unreliable.
Answer: Floppy disk
To view all questions and flashcards with answers, click on the resource link above.
3
Chapter 2: Input, Processing, and Output
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/20922
Sample Questions
Q1) Comments in Python begin with the # character.
A)True
B)False
Answer: True
Q2) A(n) _______________ is a single task that the program must perform in order to satisfy the customer.
Answer: software requirement
Q3) The program development cycle is made up of _____ steps that are repeated until no errors can be found in the program.
A) five
B) four
C) three
D) six
Answer: A
Q4) _______________ are notes of explanation that document lines or sections of a program.
Answer: Comments
Q5) The % symbol is the remainder operator and it is also known as the _______________ operator.
Answer: modulus

4
To view all questions and flashcards with answers, click on the resource link above.

Chapter 3: Decision Structures and Boolean Logic
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/20923
Sample Questions
Q1) In flowcharting, the _______________ symbol is used to represent a Boolean expression.
Answer: diamond
Q2) Nested decision structures are one way to test more than one condition.
A)True
B)False
Answer: True
Q3) What is the result of the following Boolean expression, if x equals 5, y equals 3, and z equals 8?
X < y or z > x
A) true
B) false
C) 8
D) 5
Answer: A
Q4) A(n) _______________ operator determines whether a specific relationship exists between two values.
Answer: relational
Q5) The _______________ statement is used to create a decision structure.
Answer: if
To view all questions and flashcards with answers, click on the resource link above. Page 5

Chapter 4: Repetition Structures
Available Study Resources on Quizplus for this Chatper
34 Verified Questions
34 Flashcards
Source URL: https://quizplus.com/quiz/20924
Sample Questions
Q1) A(n) _______________ structure causes a statement or set of statements to execute repeatedly.
Q2) Both of the following for clauses would generate the same number of loop iterations: for num in range(4): for num in range(1,5):
A)True
B)False
Q3) A(n) _______________-controlled loop causes a statement or set of statements to repeat as long as a condition is true.
Q4) A(n) _______________ validation loop is sometimes called an error trap or an error handler.
Q5) In a nested loop, the inner loop goes through all of its iterations for every single iteration of an outer loop.
A)True
B)False
Q6) A(n) _______________ loop usually occurs when the programmer forgets to write code inside the loop that makes the test condition false.
To view all questions and flashcards with answers, click on the resource link above.
Page 6

Chapter 5: Functions and Modules
Available Study Resources on Quizplus for this Chatper
69 Verified Questions
69 Flashcards
Source URL: https://quizplus.com/quiz/20925
Sample Questions
Q1) A set of statements that belong together as a group and contribute to the function definition is known as a(n) _____.
A) header
B) block
C) return
D) parameter
Q2) The term _______________ is used to describe any mechanism that accepts input, performs some operation that cannot be seen, and produces output.
Q3) In a value-returning function, the value of the expression that follows the key word _____ will be sent back to the part of the program that called the function.
A) def
B) return
C) sent
D) result
Q4) Functions in the standard library are stored in files that are known as _______________.
Q5) The _______________ chart is an effective tool that programmers use for designing and documenting functions.
To view all questions and flashcards with answers, click on the resource link above. Page 7

Chapter 6: Files and Exceptions
Available Study Resources on Quizplus for this Chatper
34 Verified Questions
34 Flashcards
Source URL: https://quizplus.com/quiz/20926
Sample Questions
Q1) If the last line in a file is not terminated with a \n, the readline method will return the line without a \n.
A)True
B)False
Q2) A(n) _______________ includes one or more statements that can potentially raise an exception.
Q3) A(n) _______________ file contains data that has not been converted to text.
Q4) Programmers usually refer to the process of _______________ data in a file as "writing data to" the file.
Q5) In Python, there is nothing that can be done if the program tries to access a file to read that does not exist.
A)True
B)False
Q6) If a file with the specified name already exists when the file is opened, and the file is opened in 'w' mode, then an alert will appear on the screen.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above.
Page 8

Chapter 7: Lists and Tuples
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/20927
Sample Questions
Q1) What would be the value of the variable list after the execution of the following code?
List = [1, 2, 3, 4]
List[3] = 10
A) [1, 2, 3, 10]
B) [1, 2, 10, 4]
C) [1, 10, 10, 10]
D) invalid code
Q2) What is the advantage of using tuples over lists?
A) Tuples are not limited in size.
B) Tuples can include any data type as an element.
C) Processing a tuple is faster than processing a list.
D) There is no advantage.
Q3) When working with multiple sets of data, one would typically use a(n) _____.
A) list
B) tuple
C) nested list
D) Sequence
Q4) The _______________ method reverses the order of the items in the list.
Q5) Lists are _______________, which means their elements can be changed.
To view all questions and flashcards with answers, click on the resource link above. Page 9

Chapter 8: More About Strings
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/20928
Sample Questions
Q1) What is the first negative index in a string?
A) 0
B) -1
C) -0
D) Size of the string minus one
Q2) Which list will be referenced by the variable list_strip after the execution of the following code?
List_string = '03/07/2008'
List_strip = list_string.split('/')
A) ['3', '7', '2008']
B) ['03', '07', '2008']
C) ['3', '/', '7', '/', '2008']
D) ['03', '/', '07', '/', '2008']
Q3) Each character in a string has a(n) _______________ which specifies its position in the string.
Q4) If a whole paragraph is included in a single string, the split() method can be used to obtain a list of the sentences included in the paragraph.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 10

Chapter 9: Dictionaries and Sets
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/20929
Sample Questions
Q1) Which method would you use to return the value associated with a specified key and remove that key-value pair from the dictionary?
A) list
B) items
C) popitem
D) pop
Q2) What is the process used to convert an object to a stream of bytes that can be saved in a file?
A) Pickling
B) Streaming
C) Writing
D) Dumping
Q3) Each element in a(n) _______________ has two parts: a key and a value.
Q4) Sets are immutable.
A)True
B)False
Q5) The _______________ method clears the contents of a dictionary.
Q6) The _______________ of two sets is a set that contains all the elements of both sets.
To view all questions and flashcards with answers, click on the resource link above. Page 11
Q7) To add a single item to a set, you can use the set method _______________.

Chapter 10: Classes and Object Oriented Programming
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/20930
Sample Questions
Q1) A class might be thought of as a 'blueprint' that an object may be created from.
A)True
B)False
Q2) In _______________ programming, the programming is centered on objects that are created from abstract data types that encapsulate data and functions together.
Q3) An object's _______________ is simply the values of the object's attributes at any given moment.
Q4) The instances of a class share the data attributes in the class.
A)True
B)False
Q5) The self parameter need not be named self, but it is strongly recommended to conform with standard practice.
A)True
B)False
Q6) What is another name for the accessor methods?
A) Setters
B) Getters
C) Instances
D) Attributes
To view all questions and flashcards with answers, click on the resource link above. Page 12

Chapter 11: Inheritance
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/20931
Sample Questions
Q1) What is the relationship called in which one object is a specialized version of another object?
A) Parent-child
B) Node
C) Is a
D) Class
Q2) What concept involves a superclass and a subclass?
A) Polymorphism
B) Inheritance
C) Encapsulation
D) Methods
Q3) When a class inherits another class, it is required to use all the data attributes and methods of the superclass.
A)True
B)False
Q4) In a UML diagram, what does the open arrowhead point to?
A) Superclass
B) Subclass
C) Object
D) Method
To view all questions and flashcards with answers, click on the resource link above. Page 13

Chapter 12: Recursion
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/20932
Sample Questions
Q1) If a recursive solution is evident for a particular problem, and the recursive algorithm does not slow system performance by an intolerable amount, then recursion would be a good design choice.
A)True
B)False
Q2) All the cases of the recursive solution other than the base case are called the _______________ case.
Q3) What defines the depth of recursion?
A) The length of the algorithm
B) The numbers of function calls
C) The number of times the function calls itself
D) The number of times it goes back to the main function
Q4) Each time a function is called, the system incurs _______________ that is not necessary with a loop.
Q5) A recursive function must have some way to control the number of times it repeats. A)True
B)False
Q6) Recursive function calls are _______________ efficient than loops.
Q7) Some problems are _______________ solved with recursion than with a loop.
Page 14
To view all questions and flashcards with answers, click on the resource link above.

Chapter 13: GUI Programming
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/20933
Sample Questions
Q1) Which widget will display multiple lines of text?
A) Label
B) Canvas
C) Message
D) Text
Q2) Programs that use tkinter do not always run reliably under IDLE.
A)True
B)False
Q3) An info dialog box is a simple window that displays a message to the user and has an OK button that closes the dialog box.
A)True
B)False
Q4) _______________ are small windows that display information and allow the user to perform actions.
Q5) Which widget will create an area that displays one line of text or an image?
A) Label
B) Frame
C) Canvas
D) Message
Q6) The _______________ module allows you to create GUI programs in Python.
To view all questions and flashcards with answers, click on the resource link above. Page 15