CS 1101 Graded Quiz Unit 6B.docx-The cor...
CS_1101_Graded_Quiz_Unit_6B.docx-The correct answer is: 7 Question
Showing 1-7 out of 7
CS 1101 Graded Quiz Unit 6B.docx-The correct answe...
CS_1101_Graded_Quiz_Unit_6B.docx-The correct answer is: 7 Question
CS 1101 Graded Quiz Unit 6B.docx-Th...
CS_1101_Graded_Quiz_Unit_6B.docx-The correct answer is: 7 Question
Page 2
The correct answer is: 7
Question
2
Correct
Mark 1.00 out
of 1.00
Question
3
Correct
Mark 1.00 out
of 1.00
What output will the following statements produce?
n = 2
n += 5
n
Select one:
7
5
0
None
Expressions evaluate to either true or false. What will the output of the following code be when the expression (Ni!) is evaluated?
if "Ni!":
print ('We are the Knights who say, "Ni!"') else:
print ("Stop it! No more of this!")
Select one:
Stop it!
We are the Knights who say, "Ni!
Stop it! No more of this!"
No output will be produced


Page 3
The correct answer is: We are the Knights who say, "Ni!
A stack diagram shows the value of each variable and the funcon to which each variable belongs.
Select one:
True False
The correct answer is 'True'.
Question
4
Correct
Mark 1.00 out
of 1.00


Page 4
The correct answer is: 1 is less than 2
True or False: The graphical representaon of a stack of funcons, their variables, and the values to which they refer is called a traceback?
Select one:
True False
The correct answer is 'False'.
Question
6
Correct
Mark 1.00 out
of 1.00
Question
5
Correct
Mark 1.00 out
of 1.00
What output will the following python commands produce:
x=1 y=2
if x == y:
print (x, "and", y, "are equal") else:
if x < y:
print (x, "is less than", y) else:
print (x, "is greater than", y)
Select one:
1 and 2 are equal
1 is less than 2
1 is greater than 2
2 is greater than 1


Page 5
The correct answer is: 13.0
True or False: A local variable is a variable defined inside a funcon that can only be used inside its funcon.
Select one:
True False
The correct answer is 'True'.
Question
8
Correct
Mark 1.00 out
of 1.00
What output will the following code produce?
def area(l, w): temp = l * w; return temp
l = 4.0
w = 3.25
x = area(l, w) if ( x ):
print (x)
Select one:
a. 13.0
0
Expression does not evaluate to boolean true
13
Question


Page 6
The correct answer is: See You See Me See You See Me
What output will the following python commands produce:
x = 5
if x % 2 == 0: print (x)
else:
print (x, x%2)
Select one:
5
5 1
2
5 0
Question
Correct
Mark 1.00 out
of 1.00
What output will the following Python script produce?
def funcon2(param): print (param, param)
def funcon1(part1, part2): cat = part1 + part2 funcon2(cat)
chant1 = "See You " chant2 = "See Me " funcon1(chant1, chant2)
Select one:
See You See Me
See You See Me See You See Me
See Me See Me See You See You
None it would generate an error
Question
The correct answer is: 5 1


Ace your assessments! Get Better Grades
Browse thousands of Study Materials & Solutions from your Favorite Schools
Bethany Lutheran College
Bethany_Lutheran_College
School:
Python
Course:
Great resource for chem class. Had all the past labs and assignments
Leland P.
Santa Clara University
Introducing Study Plan
Using AI Tools to Help you understand and remember your course concepts better and faster than any other resource.
Find the best videos to learn every concept in that course from Youtube and Tiktok without searching.
Save All Relavent Videos & Materials and access anytime and anywhere
Prepare Smart and Guarantee better grades

Students also viewed documents