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 |