Skip to main content

Computational Thinking with Python Mock Exam - 488 Verified Questions

Page 1


Computational Thinking with Python

Mock Exam

Course Introduction

Computational Thinking with Python is a foundational course that introduces students to the core concepts of problem-solving and logical reasoning using the Python programming language. Through a combination of theory and hands-on programming exercises, students learn to break down complex problems, design algorithms, and implement solutions that can be automated by computers. The course emphasizes the development of skills such as abstraction, pattern recognition, and decomposition while building proficiency in Python syntax, data types, control structures, and functions. By applying computational thinking to real-world scenarios, students acquire practical experience in coding and develop analytical skills essential for further studies in computer science and related fields.

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 process known as the _____ cycle is used by the CPU to execute instructions in a program.

A) decode-fetch-execute

B) decode-execute-fetch

C) fetch-decode-execute

D) fetch-execute-decode

Answer: C

Q2) Which computer language uses short words known as mnemonics for writing programs?

A) Assembly

B) Java

C) Pascal

D) Visual Basic.

Answer: A

Q3) A computer is a single device that performs different types of tasks for its users.

A)True

B)False

Answer: False

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) The _____ built-in function is used to read a number that has been typed on the keyboard.

A) input()

B) read()

C) get()

D) keyboard()

Answer: A

Q2) Python uses _______________ to categorize values in memory.

Answer: data types

Q3) In Python, math expressions are evaluated from left to right, no matter what the operators are.

A)True

B)False

Answer: False

Q4) _______________ are notes of explanation that document lines or sections of a program.

Answer: Comments

Q5) A(n) _______________ is a single task that the program must perform in order to satisfy the customer.

Answer: software requirement

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) A(n) _______________ operator determines whether a specific relationship exists between two values.

Answer: relational

Q2) What is the result of the following Boolean expression, if x equals 5, y equals 3, and z equals 8?

X < y and z > x

A) true

B) false

C) 8

D) 5

Answer: B

Q3) Which logical operators perform short-circuit evaluation?

A) or, not B) not, and C) or, and D) and, or, not

Answer: C

Q4) The logical _______________ operator reverses the truth of a Boolean expression.

Answer: not

Page 5

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

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) The first line in the while loop is referred to as the condition clause.

A)True

B)False

Q3) A(n) _______________ is a special value that marks the end of a sequence of items.

Q4) The variable used to keep the running total is called a(n) _____.

A) Accumulator

B) Total

C) running total

D) grand total

Q5) The acronym _______________ refers to the fact that the computer cannot tell the difference between good data and bad data.

Q6) A(n) _______________-controlled loop causes a statement or set of statements to repeat as long as a condition is true.

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 'P' in the acronym IPO refers to _______________.

Q2) A value-returning function has a(n) _______________ statement that returns a value back to the part of the program that called it.

Q3) 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

Q4) A(n) _____ constant is a global name that references a value that cannot be changed.

A) keyword

B) local

C) global

D) string

Q5) Boolean functions are useful for simplifying complex conditions that are tested in decision and repetition structures.

A)True

B)False

Q6) Functions in the standard library are stored in files that are known as

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) 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.

Q2) What type of file access jumps directly to any piece of data in a file without reading the data that came before it?

A) Sequential

B) Random

C) Number

D) Text

Q3) When a piece of data is read from a file, it is copied from the file into the program.

A)True

B)False

Q4) The ZeroDivisionError exception is raised when the program attempts to perform a division by zero.

A)True

B)False

Q5) A(n) _______________ file contains data that has not been converted to text.

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 method or operator can be used to concatenate lists?

A) *

B) +

C) %

D) concat

Q2) What are the data items in the list called?

A) data

B) elements

C) items

D) values

Q3) What method can be used to convert a tuple to a list?

A) append

B) tuple

C) insert

D) list

Q4) In slicing, if the end index specifies a position beyond the end of the list, Python will use the length of the list instead.

A)True

B)False

Q5) A(n) _______________ is a span of items that are taken from a sequence.

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) If the + operator is used on strings, it produces a string that is the combination of the two strings used as its operands.

A)True

B)False

Q2) What is the return value of the string method lstrip()?

A) The string with all whitespace removed

B) The string with all leading spaces removed

C) The string with all leading tabs removed

D) The string with all leading whitespaces removed

Q3) What is the first negative index in a string?

A) 0

B) -1

C) -0

D) Size of the string minus one

Q4) The index - 1 identifies the last character in a string.

A)True

B)False

Q5) When the operand on the left side of the * symbol is a string and the operand on the right side is an integer, it becomes the _______________ operator.

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) The elements in a dictionary are not stored in a specific order. Therefore a dictionary is not a(n) _______________.

Q2) In a dictionary, you use a(n) _____ to locate a specific value.

A) datum

B) element

C) item

D) key

Q3) The union of two sets is a set that contains only the elements that appear in both sets.

A)True

B)False

Q4) The _______________ method clears the contents of a dictionary.

Q5) A dictionary can include the same value several times, but cannot include the same key several times.

A)True

B)False

Q6) Sets are created using curly braces {}.

A)True

B)False

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) Object-oriented programming allows us to hide the object's data attributes from code that is outside the object.

A)True

B)False

Q2) A(n) _______________ is code that specifies the data attributes and methods for a particular type of object.

Q3) When a method is called, what does Python make to reference the specific object on which the method is supposed to operate?

A) state variable

B) self parameter

C) object data

D) init procedure

Q4) A class might be thought of as a 'blueprint' that an object may be created from.

A)True

B)False

Q5) _______________ programming is a method of writing software that centers on the actions that take place in a program.

Q6) An object's _______________ is simply the values of the object's attributes at any given moment.

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) Which method can you use to determine whether an object is an instance of a class?

A) isinstance

B) isclass

C) isobject

D) isinheritance

Q2) _______________ allows subclasses to have methods with the same names as methods in their superclasses.

Q3) New attributes and methods may be added to a subclass, which makes it a(n) _______________ version of the superclass.

Q4) Base classes are also called _____.

A) superclasses

B) derived

C) subclasses

D) classes

Q5) Polymorphism works on any two class methods that have the same name.

A)True

B)False

Q6) In an inheritance relationship, a television is a(n) _______________ of the electronics 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) Recursion is required to solve some type of problems.

A)True

B)False

Q2) There can be several functions involved in the recursion.

A)True

B)False

Q3) The majority of repetitive programming tasks are best done with _______________.

Q4) What is referred to as the base case?

A) At least one case in which the problem can be solved without recursion

B) The circumstances to solve the problem using recursion

C) The way to stop the recursion

D) The way to return to the main function

Q5) In many cases a solution using recursion is more evident than a solution using a loop.

A)True

B)False

Q6) Some problems are _______________ solved with recursion than with a loop.

Q7) Usually, a problem is reduced by making the value of one or more parameters _______________ with each recursive call.

Q8) Recursive function calls are _______________ efficient than loops. Page 14

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

35 Verified Questions

35 Flashcards

Source URL: https://quizplus.com/quiz/20933

Sample Questions

Q1) What are the items that appear on the graphical interface window called?

A) Buttons

B) Icons

C) Widgets

D) Graphical elements

Q2) In a GUI environment, most interactions are done through small windows known as _____ that display information and allow the user to perform actions.

A) input boxes

B) windows

C) dialog boxes

D) message boxes

Q3) A(n) _______________ is a widget that the user can click to cause an action to occur.

Q4) In a GUI environment, no text input is possible.

A)True

B)False

Q5) Python does not have GUI programming features built into the language itself.

A)True

B)False

Q6) The GUI popularized the use of the _______________ as an input device.

Page 16

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

Turn static files into dynamic content formats.

Create a flipbook
Computational Thinking with Python Mock Exam - 488 Verified Questions by Quizplus - Issuu