Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 10 out of 149 pages
Exam (elaborations)

Python Programming in Context Fourth Edition Anderson TESTBANK PDF

Document preview thumbnail
Preview 10 out of 149 pages

Python Programming in Context Fourth Edition Anderson TESTBANK PDF

Content preview

, TESTBANK FOR Python Programming in Context Fourth Edition Anderson

Important Notes
 The file includes the complete test bank, organized chapter by chapter.
 A sample of selected pages has been provided for preview.
 All available appendices and Excel files (if included in the original resources) are
provided.
 Quizzes, Midterm and final exams are included (if available in the original resources).
 We continuously update our files to ensure you receive the latest and most accurate
editions.
 New editions are added regularly – stay connected for updates!
 ⚠️Note on Answer Keys: If the answer key is not included within the chapter
questions, you will find the complete answers and solutions at the end of each
chapter.

✅ Why Buy From Us?
 📚 Complete & organized chapter-by-chapter – no missing content, no guessing.
 ⚡ Instant digital delivery – get your file the moment you pay, no waiting.
 📅 Always up to date – we track new editions so you always get the latest version.
 💬 Friendly support – real humans ready to help, anytime you need us.
 🔒 Safe & secure – thousands of satisfied students trust us every semester.

🛡️Our Guarantees
 💰 Money-Back Guarantee: Not satisfied? We offer a full refund – no questions asked.
 🔄 Wrong File? No Problem: Contact us and we will replace it immediately with the
correct version, free of charge.
 ⏰ 24/7 Support: We are always here – reach out anytime and expect a fast response.

,Python Programming in Context 4E
Ch. 01
Test Bank
Julie Anderson, Jon Anderson



Import Settings:
Base Settings: Brownstone Default
Information Field: Complexity
Information Field: Ahead
Information Field: Subject
Information Field: Title
Highest Answer Letter: D
Multiple Keywords in Same Paragraph: No




Multiple Choice



1. How does your text differentiate the three levels of problem-solving?
A) Input, variables, and output
B) Strategy, tactics, and tools
C) Algorithms, programs, and plans
D) Analysis, implementation, and execution
Ans: B
Complexity: Moderate
Ahead: Problem-Solving Strategies
Subject: Chapter 1
Title: Introduction to Python



2. You are working out a solution to a problem with the tips given in Chapter 1 of your text.
What technique enables you to go from some specific examples of a solution to a solution that
can be implemented as a program?
A) Generalization
B) Simplification
C) Representation
D) Visualization
Ans: A
Complexity: Easy
Ahead: Problem-Solving Strategies
Subject: Chapter 1
Title: Introduction to Python



Copyright © 2025 by Jones & Bartlett Learning, LLC, an Ascend Learning Company

,3. You can type commands interactively at the Python shell by opening the Python interpreter
and starting a(n):
A) expression.
B) listing.
C) session.
D) object.
Ans: C
Complexity: Easy
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



4. Whole numbers in Python are called:
A) complex numbers.
B) decimals.
C) floating-point numbers.
D) integers.
Ans: D
Complexity: Easy
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



5. You have entered a calculation in the Idle Python interpreter. To see the result of this
calculation, which key would you press?
A) Spacebar
B) Tab
C) Enter (or Return)
D) =
Ans: C
Complexity: Easy
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



6. Which of the following is the Idle Python prompt?
A) >>
B) >>>



Copyright © 2025 by Jones & Bartlett Learning, LLC, an Ascend Learning Company

,C) #
D) //
Ans: B
Complexity: Easy
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



7. What is the result of the expression 15//2?
A) 1
B) 7
C) 7.5
D) 30
Ans: B
Complexity: Moderate
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



8. What is the result of the expression 15/2?
A) 1
B) 7
C) 7.5
D) 8
Ans: C
Complexity: Moderate
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



9. What do you use to associate an object name with an expression in Python?
A) Object space
B) Key label
C) Assignment statement
D) Abstract reference
Ans: C
Complexity: Easy
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



Copyright © 2025 by Jones & Bartlett Learning, LLC, an Ascend Learning Company

,10. The name that allows us to locate a Python object is a(n):
A) algorithm.
B) assignment.
C) operand.
D) variable.
Ans: D
Complexity: Easy
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



11. Consider the following sequence of assignment statements:
x = 15
y = 25
x=y
What is the value of x after the first line?
A) 0
B) 15
C) 25
D) y
Ans: B
Complexity: Moderate
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



12. Consider the following sequence of assignment statements:
x = 15
y = 25
x=y
What is the value of x after the last line?
A) 0
B) 15
C) 25
D) z
Ans: C
Complexity: Moderate
Ahead: Python Overview
Subject: Chapter 1



Copyright © 2025 by Jones & Bartlett Learning, LLC, an Ascend Learning Company

,Title: Introduction to Python



13. The turtle module provides us with a simple graphics programming tool known as a
“turtle.” Very simply, a turtle is an object that we can control. A turtle can move forward or
backward, and it can turn in any direction. When a turtle moves, it draws a line if its tail is down.
A turtle object has both attributes and methods. One of the attributes of a turtle is:
A) color.
B) forward.
C) down.
D) dot.
Ans: A
Complexity: Moderate
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



14. The turtle module provides us with a simple graphics programming tool known as a
“turtle.” Very simply, a turtle is an object that we can control. A turtle can move forward or
backward, and it can turn in any direction. When a turtle moves, it draws a line if its tail is down.
A turtle object has both attributes and methods. The turtle ____ method does not take any
parameters.
A) forward
B) position
C) right
D) fillcolor
Ans: B
Complexity: Moderate
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



15. The turtle module provides us with a simple graphics programming tool known as a
“turtle.” Very simply, a turtle is an object that we can control. A turtle can move forward or
backward, and it can turn in any direction. When a turtle moves, it draws a line if its tail is down.
A turtle object has both attributes and methods. Assume you have created a turtle instance. What
is the result of calling the position method?
A) (0.0)
B) (0.00, 0.00)
C) (50.00, 50.00)
D) (100.00, 100.00)


Copyright © 2025 by Jones & Bartlett Learning, LLC, an Ascend Learning Company

,Ans: B
Complexity: Moderate
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



16. Consider the following for loop template. How many times will statement1 be executed?
for i in range(5):
statement1
statement2
...
A) 0
B) 1
C) 5
D) n
Ans: C
Complexity: Moderate
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



17. Given the following function definition, and assuming you have created a turtle named t,
which of the statements below produces a square?
def drawPolygon(myTurtle, sideLength, numSides):
turnAngle = 360 / numSides
for i in range(numSides):
myTurtle.forward(sideLength)
myTurtle.right(turnAngle)
A) drawPolygon(t, 100, 4)
B) drawPolygon(t, 100, 8)
C) drawPolygon(t, 50, 20)
D) drawPolygon(t, 20, 20)
Ans: A
Complexity: Difficult
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



True or False




Copyright © 2025 by Jones & Bartlett Learning, LLC, an Ascend Learning Company

,1. True or False? Machine learning is providing key help on the forefront of diagnosing disease.
Ans: True
Complexity: Easy
Ahead: Why Study Computer Science?
Subject: Chapter 1
Title: Introduction to Python



2. True or False? The best way to learn Python is to read through a textbook before typing any
commands to ensure that you understand the key concepts first.
Ans: False
Complexity: Easy
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



3. True or False? At a high level, the Python interpreter simply does two things over and over
again: (1) read and (2) write.
Ans: False
Complexity: Easy
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



4. True or False? When converting floating-point numbers to integers, Python always truncates
the fractional part of the number.
Ans: True
Complexity: Easy
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



5. True or False? To get the remainder after integer division, use the modulo operator (%).
Ans: True
Complexity: Easy
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



Copyright © 2025 by Jones & Bartlett Learning, LLC, an Ascend Learning Company

, Matching



1. Match each term with its definition.
1. Used by Python to classify different kinds of objects.
Ans: Type
2. A combination of operators and operands.
Ans: Expression
3. The name found on the left side of the equals sign in an assignment statement.
Ans: Variable
4. A method that creates a new object.
Ans: Constructor
5. Step-by-step instructions that provide a solution to a problem.
Ans: Program
Complexity: Moderate
Ahead: Python Overview
Subject: Chapter 1
Title: Introduction to Python



Essay



1. Illustrate how computer science is used every day with an example.
Ans: If you go to the doctor and need medical imaging such as a computed axial tomography
(CAT) scan or magnetic resonance imaging (MRI), you are relying on sophisticated computer
programs to create and interpret the images of your body. If you peek into the cockpit of an
airplane, you will see panels of displays with virtual switches. In addition, the pilot of the
airplane has spent many hours training in a simulated environment controlled by a computer.
Complexity: Moderate
Ahead: Why Study Computer Science?
Subject: Chapter 1
Title: Introduction to Python



2. You have been asked to answer the following question: “A class has 12 students. At the
beginning of class, each student shakes hands with each of the other students. How many
handshakes take place?” Explain how you would use a simplification strategy to answer this
question.



Copyright © 2025 by Jones & Bartlett Learning, LLC, an Ascend Learning Company

Document information

Uploaded on
July 11, 2026
Number of pages
149
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$25.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Sold
20
Followers
1
Items
827
Last sold
4 days ago


Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions