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 2 out of 6 pages
Exam (elaborations)

CS-3320 Chapters 1-12 Midterm Study Questions and All Correct Answers.

Document preview thumbnail
Preview 2 out of 6 pages

Given that the customer file references a file object, and the file was opened using the 'w' mode specifier, how would you write the string 'Mary Smith' to the file? - Answer customer. Write('Mary Smith') Python comes with ________ functions that have already been prewritten for the programmer. - Answer standard What will be the output after the following code is executed? import t as plt def main(): x_crd = [0, 1 , 2, 3, 4, 5] y_crd = [2, 4, 5, 2] (x_crd, y_crd) main() - Answer Nothing; the number of x-coordinates do not match the number of y-coordinates. What will be the output after the following code is executed? def pass_it(x, y): z = x + ", " + y return(z) name2 = "Tony" name1 = "Gaddis" fullname = pass_it(name1, name2) print(fullname) - Answer Gaddis, Tony

Content preview

CS-3320 Chapters 1-12 Midterm Study
Questions and All Correct Answers.
Given that the customer file references a file object, and the file was opened using the 'w' mode
specifier, how would you write the string 'Mary Smith' to the file? - Answer customer.
Write('Mary Smith')



Python comes with ________ functions that have already been prewritten for the programmer.
- Answer standard



What will be the output after the following code is executed?

import matplotlib.pyplot as plt

def main():

x_crd = [0, 1 , 2, 3, 4, 5]

y_crd = [2, 4, 5, 2]

plt.plot(x_crd, y_crd)

main() - Answer Nothing; the number of x-coordinates do not match the number of y-
coordinates.



What will be the output after the following code is executed?

def pass_it(x, y):

z = x + ", " + y

return(z)

name2 = "Tony"

name1 = "Gaddis"

fullname = pass_it(name1, name2)

print(fullname) - Answer Gaddis, Tony



Which of the following is the correct if clause to determine whether choice is anything other
than 10? - Answer if choice != 10:



What will be displayed after the following code is executed?

, 9



What is the result of the following Boolean expression, given that x = 5, y = 3, and z= 8?

not (x < y or z > x) and y < z - Answer False



What does the following statement mean?

num1, num2 = get_num() - Answer The function get_num() is expected to return a value for
num1 and for num2.



The Python library functions that are built into the Python ________ can be used by simply
calling the required function. - Answer interpreter



The Python standard library's ________ module contains numerous functions that can be used
in mathematical calculations. - Answer math



The first line in a function definition is known as the function - Answer header



The disk drive is a secondary storage device that stores data by ________ encoding it onto a
spinning circular disk. - Answer magnetically



Which of the following will hide the turtle if it is visible? - Answer if turtle.isvisible():

turtle.hideturtle()



A ________ constant is a name that references a value that cannot be changed while the
program runs. - Answer global



A(n) ________ is a variable that receives an argument that is passed into a function. - Answer
parameter



What is a group of statements that exists within a program for the purpose of performing a
specific task? - Answer a function



What will be the value of the variable list after the following code executes?

Document information

Uploaded on
September 20, 2025
Number of pages
6
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$13.49

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.
TestSolver9
3.5
(168)
Sold
962
Followers
128
Items
30913
Last sold
3 hours 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