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

Compsci 101 Cengage Quizzes Final Exam Questions and Correct Answers/ Latest Update / Already Graded

Document preview thumbnail
Preview 2 out of 11 pages

Which function returns a list of the named resources (functions and variables) in its argument? Ans: dir The expression 2 ** 3 ** 2 evaluates to which of the following values? Ans: 512 The expression round(23.67) evaluates to which of the following values? Ans: 24 What must a programmer use to test a program? Ans: A reasonable set of legitimate inputs What must you use to create a multi-line string? Ans: -A single pair of 3 consecutive double quotation marks -Embedded newline characters Page | 2 Which statement imports the functions sqrt and log from the math module? Ans: from math import sqrt, log What is used to begin an end-of-line comment? Ans: # symbol Which of the following lists of operators is ordered by decreasing precedence? Ans: **,*,+ Assume that the variable name has the value 33. What is the value of name after the assignment name = name * 2 executes? Ans: 66 interface What does a programmer do during the analysis phase of software development? Ans: Decides what the program will do and determines its user All rights reserved © 2025/ 2026 | Page | 3 Consider the following code segment: x = 5 y = 4 if x y: print( y ) else: print( x ) What value does this code segment print? Ans: 4 A Boolean expression using the and operator returns True when Ans: both operands are true How many times does a loop with the header for count in range (10): execute the statement

Content preview

Page |1


Compsci 101 Cengage Quizzes Final Exam
Questions and Correct Answers/ Latest
Update / Already Graded
Which function returns a list of the named resources (functions and
variables) in its argument?

Ans: dir


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

Ans: 512


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

Ans: 24


What must a programmer use to test a program?

Ans: A reasonable set of legitimate inputs


What must you use to create a multi-line string?

Ans: -A single pair of 3 consecutive double quotation marks
-Embedded newline characters

All rights reserved © 2025/ 2026 |

, Page |2



Which statement imports the functions sqrt and log from the math
module?

Ans: from math import sqrt, log


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

Ans: # symbol


Which of the following lists of operators is ordered by decreasing
precedence?

Ans: **,*,+


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

Ans: 66


What does a programmer do during the analysis phase of software
development?

Ans: Decides what the program will do and determines its user
interface


All rights reserved © 2025/ 2026 |

Document information

Uploaded on
December 12, 2025
Number of pages
11
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$14.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
Exampromax
5.0
(1)
Sold
5
Followers
0
Items
1135
Last sold
2 months 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