

Introduction to Computer Science
Chapter Exam Questions
Course Introduction
Introduction to Computer Science provides a broad overview of fundamental concepts and practices in the field of computing. Students will explore problem-solving techniques, basic programming constructs, algorithms, and data structures, as well as understand the underlying hardware and software components of computers. The course also introduces topics such as operating systems, computer networks, cybersecurity, and ethical considerations in technology. Emphasis is placed on developing logical thinking, code writing skills in a high-level programming language, and an appreciation for the impact of computer science on modern society.
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) What is the encoding technique called that is used to store negative numbers in the computer's memory?
A) Unicode
B) ASCII
C) floating-point notation
D) two's complement
Answer: D
Q2) Where does a computer store a program and the data that the program is working with while the program is running?
A) Main memory
B) CPU
C) Secondary storage
D) Microprocessor
Answer: A
Q3) 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
Q4) _______________ are small central processing unit chips.
Answer: Microprocessors
To view all questions and flashcards with answers, click on the resource link above. Page 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) What type of error produces incorrect results but does not prevent the program from running?
A) syntax
B) logic
C) grammatical
D) human.
Answer: B
Q2) When applying the .3f formatting specifier to the following number, 76.15854, the result is _______________.
Answer: 76.159
Q3) What is the output of the following print statement?
Print('The path is D:\\sample\\test.')
A) 'The path is D:\\sample\\test.'
B) The path is D:\\sample\\test.
C) The path is D\\sample\\test.
D) The path is D:\sample\test.
Answer: D
Q4) _______________ are notes of explanation that document lines or sections of a program.
Answer: Comments

Page 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) What is the result of the following Boolean expression, if x equals 5, y equals 3, and z equals 8?
Not (x < y or z > x) and y < z
A) true
B) false
C) 8
D) 5
Answer: B
Q2) In flowcharting, the _______________ symbol is used to represent a Boolean expression.
Answer: diamond
Q3) A(n) _______________ operator determines whether a specific relationship exists between two values.
Answer: relational
Q4) The if statement causes one or more statements to execute only when a Boolean expression is true.
A)True
B)False
Answer: True
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) What type of loop structure repeats the code a specific number of times?
A) Condition-controlled loop
B) Number-controlled loop
C) Count-controlled loop
D) Boolean-controlled loop
Q2) 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
Q3) The first line in the while loop is referred to as the condition clause.
A)True
B)False
Q4) In flowcharting, the decision structure and the repetition structure both use the diamond symbol to represent the condition that is tested.
A)True
B)False
Q5) The _______________ function is a built-in function that generates a list of integer values.
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) Unlike other languages, in Python, the number of values a function can return is limited to one.
A)True
B)False
Q2) Given the following function definition, what would the statement print magic(5) display?
Def magic(num):
Return num + 2 * 10
A) 70
B) 25
C) Statement will cause a syntax error.
D) Statement will cause a run-time error.
Q3) Arguments are passed by _______________ to the corresponding parameter variables in the function.
Q4) The first line in the function definition is known as the function _____.
A) header
B) block
C) return
D) parameter
Q5) The 'P' in the acronym IPO refers to _______________.
Page 7
To view all questions and flashcards with answers, click on the resource link above.

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) A(n) _______________ access file retrieves data from the beginning of the file to the end of the file.
Q2) It is possible to create a while loop that determines when the end of a file has been reached.
A)True
B)False
Q3) A(n) _______________ gives information regarding the line number(s) that caused an exception.
Q4) 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
Q5) The ZeroDivisionError exception is raised when the program attempts to perform a division by zero.
A)True
B)False
Q6) A(n) _______________ file contains data that has been encoded as text, using a scheme such as ASCII.
Q7) A(n) _______________ file contains data that has not been converted to text.
Page 8
To view all questions and flashcards with answers, click on the resource link above.
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) A(n) _______________ is an object that holds multiple items of data.
Q2) Each element in a tuple has a(n) _______________ that specifies its position in the tuple.
Q3) 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.
Q4) Indexing starts at 1, so the index of the first element is 1, the index of the second element is 2, and so forth.
A)True
B)False
Q5) What would be the value of the variable list after the execution of the following code?
List = [1, 2]
List = list * 3
A) [1, 2] * 3
B) [3, 6]
C) [1, 2, 1, 2, 1, 2]
D) [[1, 2], [1, 2], [1, 2]]

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

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) Which of the following string methods can be used to determine if a string contains only '\n' characters?
A) ischar()
B) isalpha()
C) istab()
D) isspace()
Q2) Which method would you use to determine whether a substring is present in a string?
A) endswith(substring)
B) find(substring)
C) replace(string, substring)
D) startswith(substring)
Q3) When accessing each character in a string, such as for copying purposes, you would typically use a while loop.
A)True
B)False
Q4) A(n) _______________ is a span of characters that are taken from within a string.
Q5) The third number in string slicing brackets represents the _______________ value.
10
To view all questions and flashcards with answers, click on the resource link above.

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) The index of the first key-value pair in a dictionary is 0.
A)True
B)False
Q2) The _______________ of two sets is a set that contains all the elements of both sets.
Q3) A dictionary can include the same value several times, but cannot include the same key several times.
A)True
B)False
Q4) In order to avoid KeyError exceptions, you can check whether a key is in the dictionary using the _____ operator.
A) included
B) of C) in
D) not in
Q5) The _______________ method returns a value associated with a specified key and if found, removes that key-value pair from the dictionary.
Q6) The _______________ method clears the contents of a dictionary.
Q7) Each element in a(n) _______________ has two parts: a key and a value.
Page 11
To view all questions and flashcards with answers, click on the resource link above.

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) Which method is automatically executed when an instance of the class is created in memory?
A) __state__
B) __obj__
C) __str__
D) __init__
Q2) What type of method provides a safe way for code outside a class to retrieve the values of attributes, without exposing the attributes in a way that they could be changed by the code outside the method?
A) Accessor
B) Mutator
C) Setter
D) Class
Q3) What is the special name given to the method that returns a string containing the object's state?
A) __state__
B) __obj__
C) __str__
D) __init__
Q4) A(n) _______________ method in a class initializes an object's data 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) Each subclass has a method named __init__ that overrides the superclass's __init__.
A)True
B)False
Q2) The term _______________ refers to an object's ability to take different forms.
Q3) It is not possible to indicate inheritance in a UML diagram.
A)True
B)False
Q4) What does a subclass inherit from a superclass?
A) Instances and attributes
B) Data and methods
C) Methods and instances
D) Attributes and methods
Q5) When a class inherits another class, it is required to use all the data attributes and methods of the superclass.
A)True
B)False
Q6) A subclass may not override any method other than the __init__ method.
A)True
B)False

Page 13
To view all questions and flashcards with answers, click on the resource link above.
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) What is referred to as the recursive case?
A) At least one case in which the problem can be solved without recursion
B) A way to solve the problem in all other circumstances using recursion
C) The way to stop the recursion
D) The way to return to the main function
Q2) When function A calls function B, which in turn calls function A, it is known as indirect recursion.
A)True
B)False
Q3) If the problem can be solved immediately without recursion, then the recursive function _____.
A) solves it and returns
B) Exits
C) returns the result
D) generates a run-time error
Q4) A recursive function includes _____ which are not necessary in a loop structure.
A) function calls
B) conditional clauses
C) overhead actions
D) object instances

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) The Toplevel widget is a container, like a(n) _____, but displays in its own window.
A) Label
B) Frame
C) Canvas
D) Message
Q3) GUI programs respond to the actions of the user, and so they are called _______________ programs.
Q4) The Label widget's _______________ method determines where a widget should be positioned and makes the widget visible when the main window is displayed.
Q5) The _______________ widget is used to display text in a window.
Q6) A(n) _______________ allows the user to interact with the operating system and other programs through graphical elements on the screen.
Q7) The _______________ module allows you to create GUI programs in Python.
Page 15
To view all questions and flashcards with answers, click on the resource link above.