Pass the GIAC Security Certification: GPYC GPYC Questions and answers with CertsForce

Viewing page 2 out of 3 pages
Viewing questions 11-20 out of questions
Questions # 11:

If the variable "example" contains a handle to a subprocess object, which of the following would show all of the possible results of running the subprocess?

Options:

A.

example.stdout.read()


B.

example.recv(*)


C.

example.read()


D.

example.stdout.read()+example.stderr.read()


Expert Solution
Questions # 12:

What is the output of the following line of code typed into a Python interactive session?

>>>print (8 <<1)

Options:

A.

False


B.

16


C.

SyntaxError: invalid syntax


D.

True


Expert Solution
Questions # 13:

What happens if a programmer fails to build exception handling into a program, and the program encounters an unexpected error condition?

Options:

A.

The interpreter will ignore the error and move to the next line


B.

The application will print a warning to the console and continue to the end


C.

The computer will "fuzz" input until it finds one that generates no error


D.

The application will terminate immediately or after resources are exhausted


Expert Solution
Questions # 14:

Review the following code:

Question # 14

What is the output of this code?

Options:

A.

blue


B.

red blue


C.

red blue yellow


D.

red


Expert Solution
Questions # 15:

Which of the following import statements will add the ability to parse data with regular expressions to your script?

Options:

A.

from regex import re


B.

import re


C.

from re import regex


D.

import regex


Expert Solution
Questions # 16:

Which of the following is the output when the following program is executed with a Python Interpreter?

Question # 16

Options:

A.

a


B.

10


C.

-10


D.

-a


Expert Solution
Questions # 17:

Review the following Python 3 code.

Question # 17

Options:

A.

539


B.

4a6e


C.

(52-4)


D.

three


Expert Solution
Questions # 18:

What is the output of the following commands typed in the Python Interactive shell?

Question # 18

Options:

A.

Try Else Except Finally


B.

Try Finally


C.

Try


D.

Try Else Finally


Expert Solution
Questions # 19:

What is the cause of the error shown below?

Question # 19

Options:

A.

A syntax error


B.

The re module hasn't been imported


C.

A bad file name


D.

The stdin module hasn't been imported


Expert Solution
Questions # 20:

When creating a new socket using the Python "sockets" module, which of the following parameters is used to specify the socket will send and receive TCP traffic? Choose Two

Options:

A.

socket.SOCK_STREAM


B.

socket. AF_NET


C.

socket.SOCK_DGRAM


D.

socket.socket


Expert Solution
Viewing page 2 out of 3 pages
Viewing questions 11-20 out of questions