文档介绍:-
. z.
does the following code do"(B)
def a(b, c, d): pass
a list hat gets printed"(C)
* = True
y = False
z = False
if not * or y:
print 1
elif not * or not y and z:
print 2
elif not * or y or not y and *:
print 3
else:
print 4
-
. z.
14. If PYTHONPATH is set in the environment, which directories are searched for modules"(D)
A) PYTHONPATH directory
B) current directory
C) home directory
D) installation dependent default path
only
and D
, B, and C
, B, and D
, B, C, and D
15. In python or earlier, the code will print error type 1 if accessSecureSystem raises an e*ception of either AccessError type or SecurityError type(B)
try:
accessSecureSystem()
e*cept AccessError, SecurityError:
print "error type 1"
-
. z.
continueWork()
16. The following code will successfully print the days and then the months(B)
daysOfWeek = ['Monday',
'Tuesday',
'Wednesday',
'Thursday',
'Friday',
'Saturday',
'Sunday']
months = ['Jan', \
'Feb', \
'Mar', \
'Apr', \
'May', \
'Jun', \
'Jul', \
'Aug', \
'Sep', \
'Oct', \
-
. z.
'Nov', \
'Dec']
print "DAYS: %s, MONTHS %s" %
(daysOfWeek, months)
17. Assuming python what gets printed"(A)
f = None
for i in range (5):
with open("*t", "w") as f:
if i > 2:
break
print
18. What gets printed"(C)
counter = 1
def doLotsOfStuff():
global