

Computational Thinking with Python Practice Exam
Course Introduction
Computational Thinking with Python introduces students to the fundamental concepts and problem-solving strategies of computational thinking, using Python as the primary programming language. The course covers breaking down complex problems, recognizing patterns, abstracting solutions, and designing algorithms, all within the context of real-world applications. Through hands-on exercises and projects, students develop practical coding skills while learning how to approach problems logically and systematically, preparing them for further studies and diverse professional fields that rely on computational methods.
Recommended Textbook
Starting Out with Python 4th Edition by Tony Gaddis
Available Study Resources on Quizplus
13 Chapters
533 Verified Questions
533 Flashcards
Source URL: https://quizplus.com/study-set/2419

Page 2
Chapter 1: Introduction to Computers and Programming
Available Study Resources on Quizplus for this Chatper
39 Verified Questions
39 Flashcards
Source URL: https://quizplus.com/quiz/48072
Sample Questions
Q1) USB drives store data using __________ memory.
Answer: flash
Q2) Programs are commonly referred to as
A) system software
B) software
C) application software
D) utility programs
Answer: B
Q3) All programs are normally stored in ROM and are loaded into RAM as needed for processing.
A)True
B)False
Answer: False
Q4) The encoding technique used to store negative numbers in the computer's memory is called
A) Unicode
B) ASCII
C) floating-point notation
D) two's complement
Answer: D

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

Chapter 2: Input, Processing, and Output
Available Study Resources on Quizplus for this Chatper
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/48073
Sample Questions
Q1) Which of the following will display 20%?
A) print(format(20, '.0%')) <enter>
B) print(format(0.2, '.0%')) <enter>
C) print(format(0.2 * 100, '.0%')) <enter>
D) print(format(0.2, '%')) <enter>
Answer: B
Q2) Select all that apply. Which of the following are steps in the program development cycle?
A) design the program
B) write the code and correct syntax errors
C) test the program
D) correct logic errors
Answer: A,B,C,D
Q3) What symbol is used to mark the beginning and end of a string?
A) a slash (/)
B) an asterisk (*)
C) a quote mark (")
D) a comma (,)
Answer: C
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
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/48074
Sample Questions
Q1) The ___________ statement is used to create a decision structure.
Answer: if
Q2) 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
Q3) What is the result of the following Boolean expression,given that x = 5,y = 3,and z = 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
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
41 Verified Questions
41 Flashcards
Source URL: https://quizplus.com/quiz/48075
Sample Questions
Q1) In a flowchart,both the decision structure and the repetition structure use the diamond symbol to represent the condition that is tested.
A)True
B)False
Q2) A while loop is called a pretest loop because the condition is tested after the loop has had one iteration.
A)True
B)False
Q3) A(n)___________ structure causes a set of statements to execute repeatedly.
Q4) 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
Q5) The acronym __________ refers to the fact that the computer cannot tell the difference between good data and bad data.
Q6) A(n)__________ validation loop is sometimes called an error trap or an error handler.
Q7) A(n)__________ is a special value that marks the end of a sequence of items.
Page 6
To view all questions and flashcards with answers, click on the resource link above.

Chapter 5: Functions
Available Study Resources on Quizplus for this Chatper
66 Verified Questions
66 Flashcards
Source URL: https://quizplus.com/quiz/48076
Sample Questions
Q1) To assign a value to a global variable in a function,the global variable must be first declared in the function.
A)True
B)False
Q2) Which of the following statements causes the interpreter to load the contents of the random module into memory?
A) load random
B) import random
C) upload random
D) download random
Q3) A(n)__________ is a variable that receives an argument that is passed into a function.
A) global variable
B) argument
C) named constant
D) parameter
Q4) The value assigned to a global constant can be changed in the mainline logic.
A)True
B)False
Q5) The code for a function is known as a function ___________.
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
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/48077
Sample Questions
Q1) Which step creates a connection between a file and a program?
A) open the file
B) read the file
C) process the file
D) close the file
Q2) Which method could be used to convert a numeric value to a string?
A) str
B) value
C) num
D) chr
Q3) Python allows the programmer to work with text and number files.
A)True
B)False
Q4) Which method will return an empty string when it has attempted to read beyond the end of a file?
A) read
B) getline
C) input
D) readline
Q5) 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
40 Verified Questions
40 Flashcards
Source URL: https://quizplus.com/quiz/48078
Sample Questions
Q1) Arrays,which are allowed by most other programming languages,have more capabilities than Python list structures.
A)True
B)False
Q2) What will be the value of the variable list after the following code executes?
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) A list cannot be passed as an argument to a function.
A)True
B)False
Q4) The __________ function returns the item that has the lowest value in the sequence.
Q5) Each element in a tuple has a(n)__________ that specifies its position in the tuple.
Q6) A(n)___________ is a span of items that are taken from a sequence.
To view all questions and flashcards with answers, click on the resource link above. Page 9
Q7) Lists are ___________,which means their elements can be changed in a program.

Chapter 8: More About Strings
Available Study Resources on Quizplus for this Chatper
37 Verified Questions
37 Flashcards
Source URL: https://quizplus.com/quiz/48079
Sample Questions
Q1) What will be displayed after the following code executes?
Mystr = 'yes'
Yourstr = 'no'
Mystr += yourstr * 2
Print(mystr)
A) yes + no * 2
B) yes + no yes + no
C) yesnono
D) yesnoyesno
Q2) Indexing of a string starts at 1 so the index of the first character is 1,the index of the second character is 2,and so forth.
A)True
B)False
Q3) The following code will display 'yes + no':
mystr = 'yes'
yourstr = 'no'
mystr += yourstr
print(mystr)
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
39 Verified Questions
39 Flashcards
Source URL: https://quizplus.com/quiz/48080
Sample Questions
Q1) The difference of set1 and aet2 is a set that contains only the elements that appear in set1 but do not appear in set2.
A)True
B)False
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) A dictionary can include the same value several times but cannot include the same key several times.
A)True
B)False
Q4) The __________ method clears the contents of a dictionary.
Q5) The __________ method returns all of a dictionary's keys as a dictionary view.
Q6) The __________ of two sets is a set that contains all the elements of both sets.
Q7) Each element in a dictionary view is a __________.
Page 11
Q8) Each element in a(n)__________ has two parts: a key and a value.
Q9) The built-in function,__________,returns the number of items in a set.
To view all questions and flashcards with answers, click on the resource link above. Page 12

Chapter 10: Classes and Object-Oriented Programming
Available Study Resources on Quizplus for this Chatper
38 Verified Questions
38 Flashcards
Source URL: https://quizplus.com/quiz/48081
Sample Questions
Q1) What does the acronym UML stand for?
A) Unified Modeling Language
B) United Modeling Language
C) Unified Model Language
D) Union of Modeling Languages
Q2) A method that returns a value from a class's attribute but does not change it is known as a(n)__________ method.
Q3) The instance attributes are created by the __________ parameter and they belong to a specific instance of the class.
Q4) An object's __________ contains the values of the object's attributes at a given moment.
Q5) The self parameter need not be named self but it is strongly recommended to do so,to conform with standard practice.
A)True
B)False
Q6) All class definitions are stored in the library so that they can be imported into any program.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 13

Chapter 11: Inheritance
Available Study Resources on Quizplus for this Chatper
36 Verified Questions
36 Flashcards
Source URL: https://quizplus.com/quiz/48082
Sample Questions
Q1) In an inheritance relationship,what is a specialized class called?
A) a superclass
B) a subclass
C) an object
D) an instance
Q2) __________ has the ability to define a method in a subclass and then define a method with the same name in a superclass.
A) Inheritance
B) Encapsulation
C) Polymorphism
D) the 'is a' relationship
Q3) When a subclass method has the same name as a superclass method,the subclass method __________ the superclass method.
Q4) One problem with using a UML diagram is that there is no way to indicate inheritance.
A)True
B)False
Q5) New attributes and methods may be added to a subclass which makes it a(n)__________ version of the superclass.
To view all questions and flashcards with answers, click on the resource link above. Page 14

Chapter 12: Recursion
Available Study Resources on Quizplus for this Chatper
35 Verified Questions
35 Flashcards
Source URL: https://quizplus.com/quiz/48083
Sample Questions
Q1) The process of calling a function requires
A) a slow memory access
B) a quick memory access
C) several actions to be performed by the computer
D) one action to be performed by the computer
Q2) In a recursive solution,if the problem cannot be solved now,then a recursive function reduces it to a smaller but similar problem and
A) exits
B) returns to the main function
C) returns to the calling function
D) calls itself to solve the smaller problem
Q3) What defines the depth of recursion?
A) the length of the algorithm
B) the number of function calls
C) the number of times the function calls itself
D) the number of times the function goes to the base case
Q4) A recursive function must have some way to control the number of times it repeats.
A)True
B)False
To view all questions and flashcards with answers, click on the resource link above. Page 15

Chapter 13: Gui Programming
Available Study Resources on Quizplus for this Chatper
42 Verified Questions
42 Flashcards
Source URL: https://quizplus.com/quiz/48084
Sample Questions
Q1) The acronym GUI stands for
A) Graphical User's Interface
B) Graphical User Interface
C) Graphical User Interaction
D) Graphical Union Interface
Q2) A(n)__________ allows the user to interact with the operating system and other programs through graphical elements on the screen.
Q3) To use an Entry widget to get data entered by a user,you must use the Entry widget's set method.
A)True
B)False
Q4) The __________ widget provides methods that allow the programmer to draw some simple shapes.
Q5) The point (0,0)represents the same place in a window with the Canvas widget as with turtle graphics.
A)True
B)False
Q6) The __________ module allows you to create GUI programs in Python.
Q7) A(n) __________ is a widget that the user can click to cause an action to occur.
Page 16
To view all questions and flashcards with answers, click on the resource link above.