

Introduction to Computer Science Practice Exam
Course Introduction
Introduction to Computer Science provides a comprehensive overview of the foundational concepts and principles underlying the field of computer science. The course covers topics such as computer hardware and software, algorithms, programming fundamentals, data structures, problem-solving techniques, and the societal impact of computing. Students will gain hands-on experience through coding exercises, computational thinking activities, and collaborative projects, equipping them with the skills necessary to understand and apply core computing ideas. This course serves as a stepping stone for further studies in computer science and related disciplines.
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) The Python language uses a compiler, which is a program that both translates and executes the instructions in a high level language.
A)True
B)False
Answer: False
Q2) In _______________ mode, the interpreter reads the contents of a file that contains Python statements and executes each statement. Answer: script
Q3) _______________ are small central processing unit chips. Answer: Microprocessors
Q4) Which of the following is considered to be the world's first programmable electronic computer?
A) IBM
B) DELL
C) ENIAC
D) GATEWAY
Answer: C
Q5) A disk drive stores data by _______________ encoding it onto a circular disk. Answer: magnetically
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) Python uses _______________ to categorize values in memory. Answer: data types
Q2) The _______________ specifier is a special set of characters that specify how a value should be formatted.
Answer: Formatting
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) In a print statement, you can set the _____ argument to a space or empty string to stop the output from advancing to a new line.
A) stop
B) end
C) separator
D) newLine
Answer: B
To view all questions and flashcards with answers, click on the resource link above. Page 4

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) The _______________ statement is used to create a decision structure. Answer: if
Q2) The not operator is a unary operator and it must be a compound expression.
A)True
B)False
Answer: False
Q3) The decision structure that has two possible paths of execution is known as _____.
A) single alternative
B) double alternative
C) dual alternative
D) two alternative
Answer: C
Q4) What does the following expression mean?
X <= y
A) x is less than y
B) x is less than or equal to y
C) x is greater than y
D) x is greater than or equal to y
Answer: B
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) _______________ validation loop is sometimes called an error trap or an error handler.
Q2) What is not an example of an augmented assignment operator?
A) *=
B) /=
C) -=
D) <=
Q3) When will the following loop terminate?
While keep_on_going != 999 :
A) When keep_on_going refers to a value less than 999
B) When keep_on_going refers to a value greater than 999
C) When keep_on_going refers to a value equal to 999
D) When keep_on_going refers to a value not equal to 999
Q4) The variable used to keep the running total is called a(n) _____.
A) Accumulator
B) Total
C) running total
D) grand total
Q5) A(n) _______________ total is a sum of numbers that accumulates with each iteration of a loop.
Page 6
To view all questions and flashcards with answers, click on the resource link above.

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) The return values of the trigonometric functions in Python are in _______________.
Q2) A variable's _____ is the part of a program in which the variable may be accessed.
A) global
B) argument
C) scope
D) local
Q3) The math function, ceil(x), returns the smallest integer that is greater than or equal to x.
A)True
B)False
Q4) In Python, one can have a list of variables on the left side of the assignment operator.
A)True
B)False
Q5) To assign a value to a global variable in a function, the global variable must first be declared in the function.
A)True
B)False
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) When a file has been opened using the 'r' mode specifier, which method will return the file's contents as a string?
A) write
B) input
C) get
D) read
Q2) A filename _______________ is a short sequence of characters that appear at the end of a filename preceded by a period.
Q3) What happens when a piece of data is written to a file?
A) Data is copied from a variable in RAM to a file.
B) Data is copied from a variable in the program to a file.
C) Data is copied from the program to a file.
D) Data is copied from a file object to a file.
Q4) It is possible to create a while loop that determines when the end of a file has been reached.
A)True
B)False
Q5) A(n) _______________ gives information regarding the line number(s) that caused an exception.
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) Invalid indexes do not cause slicing expressions to raise an exception.
A)True
B)False
Q2) 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]]
Q3) The _______________ method reverses the order of the items in the list.
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) The index - 1 identifies the last element in a list.
A)True
B)False
Q6) A(n) _______________ is an object that holds multiple items of data.
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) 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
Q3) A(n) _______________ is a span of characters that are taken from within a string.
Q4) 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)
Q5) The _______________ method returns the list of the words in the string.
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) To determine whether a key is not included in a dictionary, or an element is not included in a set, you can use the _______________ operator.
Q2) The issubset method can be used to determine whether set1 is a subset of set2.
A)True
B)False
Q3) To write an object to a file, you use the _______________ function of the _______________ module.
Q4) What is the correct structure for creating a dictionary of month names to be accessed by month numbers?
A) { 1 ; 'January', 2 ; 'February', 3 ; 'March' }
B) { 1 : 'January', 2 : 'February', 3 : 'March' }
C) [ 1 : 'January', 2 : 'February', 3 : 'March' ]
D) { 1, 2, 3 : 'January', 'February', 'March' }
Q5) In a dictionary, you use a(n) _____ to locate a specific value.
A) datum
B) element
C) item
D) key
Q6) To add a single item to a set, you can use the set method _______________.
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) What type of programming contains class definitions?
A) Procedural
B) Object
C) Object-oriented
D) Modular
Q2) A class definition is stored in the library so that it can be imported into any program.
A)True
B)False
Q3) What attributes belong to a specific instance of the class?
A) Instance
B) Self
C) Object
D) Data
Q4) Procedures operate on data items that are separate from the procedures.
A)True
B)False
Q5) In a UML diagram, the middle section holds the list of the class's methods.
A)True
B)False
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) The term _______________ refers to an object's ability to take different forms.
Q2) Which of the following is the correct syntax for defining a class dining which inherits from class furniture?
A) class furniture(dining)
B) class dining(furniture)
C) class furniture(dining):
D) class dining(furniture):
Q3) In an inheritance relationship, the extended class is called the _______________.
Q4) What gives a program the ability to call the correct method depending on the type of object that is used to call it?
A) Polymorphism
B) Inheritance
C) Encapsulation
D) Methods
Q5) It is not possible to indicate inheritance in a UML diagram.
A)True
B)False
Q6) _______________ is used to create an 'is a' relationship among classes.
Q7) A subclass is also called a(n) _______________ class.
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) The base case does not require _______________, so it stops the chain of recursive calls.
Q2) Recursive functions are _____ iterative algorithms. A) more efficient than B) less efficient than C) as efficient as D) incomparable to
Q3) Recursive function calls are _______________ efficient than loops.
Q4) A base case is not necessary for all recursive algorithms. A)True
B)False
Q5) A function is called from the main function for the first time. It then calls itself seven times. What is the depth of recursion?
A) Eight B) Two C) One D) Seven
Q6) Recursion is required to solve some type of problems. A)True B)False
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) In Python, what module is used to create a GUI program?
A) tkinter
B) Pgui
C) gint
D) pygui
Q2) Check buttons are displayed in groups and used to make mutually exclusive selections.
A)True
B)False
Q3) The GUI popularized the use of the _______________ as an input device.
Q4) Which widget will create an area that displays one line of text or an image?
A) Label
B) Frame
C) Canvas
D) Message
Q5) Using the radio buttons, the user can make multiple selections at one time.
A)True
B)False
Q6) GUI programs respond to the actions of the user, and so they are called _______________ programs.
Page 15
To view all questions and flashcards with answers, click on the resource link above.