Access Millions of academic & study documents

Xits320 mod 5 opening exercises

Content type
User Generated
Showing Page:
1/3
LATEST
Attempt 1
5 minutes
3 out of 5
Correct answers are hidden.
Submitted Feb 12 at 11:23am
Question 1
1 / 1 pts
Which of the following is not a reason to use functions?
Control spam.
Improve program readability.
Encourage modular program development.
Reduce redundant code.
Correct! Choices b, c, and d are compelling reasons to write functions.
IncorrectQuestion 2
0 / 1 pts
What is the output of the following print function?
def compute_square(num_to_square):
return
num_to_square ** 4
num_squared = 0
num_squared = compute_square(5)
print(num_squared)
625
25

Sign up to view the full document!

lock_open Sign Up
Showing Page:
2/3
125
20
Try again. Refer to section 6.3 in Chapter 6, Programming in Python 3 with Zylabs for
more information.
Question 3
1 / 1 pts
In Python, a _____ maps names to objects.
larch
namespace
function
loop
Correct! A namespace maps names to objects.
IncorrectQuestion 4
0 / 1 pts
Which of the following is not a common error when programming functions?
Copy-and-paste code among functions but then not complete all necessary
modifications to the pasted code.
Cutting down a larch.

Sign up to view the full document!

lock_open Sign Up
Showing Page:
3/3

Sign up to view the full document!

lock_open Sign Up
Unformatted Attachment Preview
LATEST Attempt 1 5 minutes Correct answers are hidden. Submitted Feb 12 at 11:23am Question 1 1 / 1 pts Which of the following is not a reason to use functions? Control spam. Improve program readability. Encourage modular program development. Reduce redundant code. Correct! Choices b, c, and d are compelling reasons to write functions. IncorrectQuestion 2 0 / 1 pts What is the output of the following print function? def compute_square(num_to_square): return num_to_square ** 4 num_squared = 0 num_squared = compute_square(5) print(num_squared) 625 25 3 out of 5 125 20 Try again. Refer to section 6.3 in Chapter 6, Programming in Python 3 with Zylabs for more information. Question 3 1 / 1 pts In Python, a _____ maps names to objects. larch namespace function loop Correct! A namespace maps names to objects. IncorrectQuestion 4 0 / 1 pts Which of the following is not a common ...
Purchase document to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Similar Documents