Graded Quiz Unit 6 PDF
Graded Quiz Unit 6 PDF
Graded Quiz Unit 6 PDF
Mark 1.00 out of The order in which statements are executed during flow of execution
1.00 a program run.
The correct answer is: The order in which statements are executed during
a program run. → ow of execution, The rst part of a compound
statement begins with a keyword and ends with a colon ( : ) → header, A
statement that executes a function. It consists of the name of the function
followed by a list of arguments enclosed in parentheses. → function call, A
variable de ned inside a function that can only be used inside its function.
→ local variable, A graphical representation of functions, their variables,
and the values to which they refer. → stack diagram
https://my.uopeople.edu/mod/quiz/review.php?attempt=1879933&cmid=172064 1/10
5/24/2019 Graded Quiz Unit 6
Question 2 Functions can only return boolean expressions.
Correct
False
Question 3 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. Reassignment
c. A logical operator
d. A conditional expression
https://my.uopeople.edu/mod/quiz/review.php?attempt=1879933&cmid=172064 2/10
5/24/2019 Graded Quiz Unit 6
Question 5 With built in functions, it is generally acceptable to take a "Leap of Faith".
Correct
False
Question 6
What is the output of the following Python program?
Correct
pi = oat(3.14159)
Mark 1.00 out of
1.00
print (pi)
Select one:
a. 3
b. 3.0
c. 3.14159
d. 0
Question 7 The statements inside of a Python loop are known as the ____ of the loop.
Correct
b. expression
c. counter
d. block
https://my.uopeople.edu/mod/quiz/review.php?attempt=1879933&cmid=172064 3/10
5/24/2019 Graded Quiz Unit 6
Question 8 What output will the following Python commands produce?
Correct
Select one:
a. percentage
b. 109
c. 109.0909090909091
d. 109.0
Question 9 Expressions evaluate to either True or False. What will be the output of the
Correct following Python 3 program?
Mark 1.00 out of
1.00 if "Ni!":
print ('We are the Knights who say, "Ni!"')
else:
print ("Stop it! No more of this!")
Select one:
a. Stop it!
The correct answer is: We are the Knights who say, "Ni!"
https://my.uopeople.edu/mod/quiz/review.php?attempt=1879933&cmid=172064 4/10
5/24/2019 Graded Quiz Unit 6
Question 10 What output will the following Python program produce?
Correct
Select one:
a. 13.0
b. 0
d. 13
https://my.uopeople.edu/mod/quiz/review.php?attempt=1879933&cmid=172064 5/10
5/24/2019 Graded Quiz Unit 6
Question 11 What output will the following Python 3 program produce?
Correct
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
Question 12
The Python 3 program below prints the number 3.
Correct
s = "Python3"
Mark 1.00 out of
1.00
print(s[len(s)])
Select one:
True
False
https://my.uopeople.edu/mod/quiz/review.php?attempt=1879933&cmid=172064 6/10
5/24/2019 Graded Quiz Unit 6
Question 13 A loop where the terminating condition is never achieved is called _______.
Correct
b. a universal loop
c. a while loop
Select one:
a. 5
b. 0
c. 10000
d. 1000
https://my.uopeople.edu/mod/quiz/review.php?attempt=1879933&cmid=172064 7/10
5/24/2019 Graded Quiz Unit 6
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
Question 16 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
https://my.uopeople.edu/mod/quiz/review.php?attempt=1879933&cmid=172064 8/10
5/24/2019 Graded Quiz Unit 6
Question 17 A development approach that is intended to avoid a lot of debugging by
Correct only adding and testing small amounts of code at a time is called:
Mark 1.00 out of
1.00 Select one:
a. structured development
b. incremental development
c. unit testing
Select one:
a. 5
b. 5 1
c. 2
d. 5 0
https://my.uopeople.edu/mod/quiz/review.php?attempt=1879933&cmid=172064 9/10
5/24/2019 Graded Quiz Unit 6
Question 19
What output will the following interactive Python statements produce?
Correct
>>> n = 2
Mark 1.00 out of
1.00
>>> n += 5
>>> n
Select one:
a. 7
b. 5
c. 0
d. None
False
◄ Self-Quiz Unit 6
Jump to...
https://my.uopeople.edu/mod/quiz/review.php?attempt=1879933&cmid=172064 10/10