A user enters unexpected data into a program. Which functionality can the programmer use to present an understandable error message to the user?
A. Casting
B. Exception handling
C. Dictionaries
D. Regular expressions
An attacker does not yet know the IP address of his target. He uses the "socket" module to create a backdoor program. He is writing the command to bind the computer's current IP address and port 4444 to the "backdoor" socket. Which command should he use?
A. backdoor.bind(UDP, 4444)
B. backdoor.bind()(4444)
C. backdoor.bind((*))
D. backdoor.bind(("",4444))
Which python regular expression method should be used to match any character in a-z, 0
A. \w
B. Greedy matching
C. A custom character set
D. \w
What will be the value of the i variable when the while loop finishes its execution0 i = 0 while i != 0: 1 = 1-1 else: i = i + 1
A. 1
B. 0
C. 2
D. the variable becomes unavailable
After calling a subprocess in a Python program, the program returns an error code of "0". What does this indicate?
A. The subprocess did not run
B. The subprocess terminated with no errors
C. The subprocess entered an infinite loop condition
D. The subprocess encountered a race condition
A gif file has the following attributes:
Extension: .gif
Magic value for start of file: \x47\x49\x46
Magic value for end of file: \x3b
A small data file called "raw_data" contains one gif.
Which of the following statements is most likely to successfully extract the file?
A. reiindall(r\-\gif,raw_data)[0]
B. re.match(r'('.gif )"',raw_data).group(1)
C. re.search('\x47\x49\x46(')\x3b',raw_data)
D. re.findall(r'\x47\x49\x46.-\x3b,,raw_data,re.DOTALL)[0]
When accessing the hard drive directly, how would the character *B' be stored?

A. 01000010
B. /x42
C. 66
D. B
What wilt the code in the screen capture print when executed?

A. 2
B. 4
C. x
D. An error
E. 6
Which of the following would produce this list?
[65, 66, 67, 68]
A. range(l,4) + 64
B. for x(4)+64
C. map(ord, "ABCD")
D. range(4)+ 65