• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 1 out of 4 pages
Exam (elaborations)

Compsci 101 Cengage Quizzes Final Exam Questions with Correct Answers Latest Update 2025/2026

Document preview thumbnail
Preview 1 out of 4 pages

Compsci 101 Cengage Quizzes Final Exam Questions with Correct Answers Latest Update 2025/2026 Which function returns a list of the named resources (functions and variables) in its argument? - Answers dir The expression 2 ** 3 ** 2 evaluates to which of the following values? - Answers 512 The expression round(23.67) evaluates to which of the following values? - Answers 24 What must a programmer use to test a program? - Answers A reasonable set of legitimate inputs What must you use to create a multi-line string? - Answers -A single pair of 3 consecutive double quotation marks -Embedded newline characters Which statement imports the functions sqrt and log from the math module? - Answers from math import sqrt, log What is used to begin an end-of-line comment? - Answers # symbol Which of the following lists of operators is ordered by decreasing precedence? - Answers **,*,+ Assume that the variable name has the value 33. What is the value of name after the assignment name = name * 2 executes? - Answers 66 What does a programmer do during the analysis phase of software development? - Answers Decides what the program will do and determines its user interface Consider the following code segment: x = 5 y = 4 if x y: print( y ) else: print( x ) What value does this code segment print? - Answers 4 A Boolean expression using the and operator returns True when - Answers both operands are true How many times does a loop with the header for count in range (10): execute the statements in its body? - Answers 10 times Consider the following code segment: theSum = 0.0 while True: number = input("Enter a number: ") if number == ": break theSum += float(number) How many iterations does this loop perform? - Answers At least one What is the output of the loop for count in range(5): print(count, end = " ")? - Answers 0 1 2 3 4 A for loop is convenient for - Answers -Counting through a sequence of numbers -Running a set of statements a predictable number of times Consider the following code segment: count = 1 while count = 10: print(count, end = " ") Which of the following describes the error in this code? - Answers The loop is infinite Consider the following code segment: count = 5 while count 1: print(count, end = " ") count -= 1 What is the output produced by this code? - Answers 5 4 3 2 When the function range receives two arguments, what does the second argument specify? - Answers The last value of a sequence of integers minus 1

Content preview

Compsci 101 Cengage Quizzes Final Exam Questions with Correct Answers Latest Update
2025/2026

Which function returns a list of the named resources (functions and variables) in its argument? -
Answers dir

The expression 2 ** 3 ** 2 evaluates to which of the following values? - Answers 512

The expression round(23.67) evaluates to which of the following values? - Answers 24

What must a programmer use to test a program? - Answers A reasonable set of legitimate
inputs

What must you use to create a multi-line string? - Answers -A single pair of 3 consecutive
double quotation marks

-Embedded newline characters

Which statement imports the functions sqrt and log from the math module? - Answers from
math import sqrt, log

What is used to begin an end-of-line comment? - Answers # symbol

Which of the following lists of operators is ordered by decreasing precedence? - Answers **,*,+

Assume that the variable name has the value 33. What is the value of name after the
assignment name = name * 2 executes? - Answers 66

What does a programmer do during the analysis phase of software development? - Answers
Decides what the program will do and determines its user interface

Consider the following code segment:

x=5

y=4

if x > y:

print( y )

else:

print( x )

What value does this code segment print? - Answers 4

A Boolean expression using the and operator returns True when - Answers both operands are
true

Document information

Uploaded on
December 11, 2025
Number of pages
4
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$11.89

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.
joshuawesonga22
3.5
(14)
Sold
130
Followers
2
Items
15395
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