Graded Quiz Unit 6 PDF
Graded Quiz Unit 6 PDF
Graded Quiz Unit 6 PDF
Select one:
a. 3
b. 3.0
c. 3.14159
d. 0
False
https://my.uopeople.edu/mod/quiz/review.php?attempt=2030572&cmid=177096 1/12
Question 3
21/8/2019 Graded Quiz Unit 6
Select one:
a. 7
b. 5
c. 0
d. None
Select one:
a. 10 5 16 8 4 2
c. 8 4 2
d. 9 28 14 7 22 11 34 17 52 26 13 40 20 10 5 16 8 4 2
https://my.uopeople.edu/mod/quiz/review.php?attempt=2030572&cmid=177096 2/12
Question 5
21/8/2019 Graded Quiz Unit 6
What output will the following Python 3 program produce?
Correct
Select one:
a. 5
b. 5 1
c. 2
d. 5 0
Select one:
a. 13.0
b. 0
d. 13
https://my.uopeople.edu/mod/quiz/review.php?attempt=2030572&cmid=177096 3/12
Question 7
21/8/2019 Graded Quiz Unit 6
What is the return type of the Python function shown below?
Correct
Mark 1.00 out of
1.00
def is_divisible(x, y):
return (x % y) == 0
Select one:
a. int
b. oat
c. bool
d. string
e. NoneType
Select one:
a. h
b. e
c. !
d. p
e. l
https://my.uopeople.edu/mod/quiz/review.php?attempt=2030572&cmid=177096 4/12
Question 9
21/8/2019 Graded Quiz Unit 6
What is the value of the variable index after the Python code below is
Correct executed?
Mark 1.00 out of
1.00
word = 'bAnana'
index = word.find('a')
Select one:
a. 3
b. 1
c. 2
d. 5
e. 0
Select one:
a. 5
b. 0
c. 10000
d. 1000
False
Select one:
a. See You See Me
The correct answer is: See You See Me See You See Me
https://my.uopeople.edu/mod/quiz/review.php?attempt=2030572&cmid=177096 6/12
Question 13
21/8/2019 Graded Quiz Unit 6
Match the following terms and de nitions
Correct
Mark 1.00 out of The order in which statements are executed during a flow of execution
1.00 program run.
https://my.uopeople.edu/mod/quiz/review.php?attempt=2030572&cmid=177096 7/12
Question 14
21/8/2019 Graded Quiz Unit 6
The following Python 3 code is an example of what principle?
Correct
Select one:
a. Reassignment
c. A logical operator
d. A conditional expression
Question 15 What is the return type of the Python function shown below?
Correct
isinstance(10.001, float)
Mark 1.00 out of
1.00
Select one:
a. int
b. oat
c. bool
d. string
e. NoneType
https://my.uopeople.edu/mod/quiz/review.php?attempt=2030572&cmid=177096 8/12
Question 16
21/8/2019 Graded Quiz Unit 6
A stack diagram shows the value of each variable and the function to which
Correct each variable belongs.
Mark 1.00 out of
1.00 Select one:
True
False
Select one:
a. 1 and 2 are equal
b. 1 is less than 2
c. 1 is greater than 2
d. 2 is greater than 1
https://my.uopeople.edu/mod/quiz/review.php?attempt=2030572&cmid=177096 9/12
Question 18
21/8/2019 Graded Quiz Unit 6
Select one:
a. 3
b. 3.0
c. 3.14159
d. 0
https://my.uopeople.edu/mod/quiz/review.php?attempt=2030572&cmid=177096 10/12
Question 19
21/8/2019 Graded Quiz Unit 6
Will the Python code below print something? And will it terminate?
Incorrect
def print_n(s, n):
Mark 0.00 out of
1.00
if n > 0:
print(s)
print_n(s, n-1)
return n
n=3
while print_n("hi", n):
print_n("there!", n)
n = 0
____
Select one:
a. no and no
b. yes and no
c. no and yes
e. syntax error
Select one:
True
False
◄ Self-Quiz Unit 6
https://my.uopeople.edu/mod/quiz/review.php?attempt=2030572&cmid=177096 11/12
21/8/2019 Graded Quiz Unit 6
Jump to...
https://my.uopeople.edu/mod/quiz/review.php?attempt=2030572&cmid=177096 12/12