Weekend Sale Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

GIAC GPYC GIAC Python Coder (GPYC) Exam Practice Test

Page: 1 / 8
Total 75 questions

GIAC Python Coder (GPYC) Questions and Answers

Question 1

What wilt the code in the screen capture print when executed?

Question # 1

Options:

A.

2

B.

4

C.

x

D.

An error

E.

6

Question 2

What will the last value of V be when Python executes the following control loop?

Question # 2

Options:

A.

4

B.

20

C.

2

D.

18

Question 3

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

>>> print ( int ("1111", 2) )

Options:

A.

1111

B.

16

C.

''1111''

D.

15

Question 4

What is the output of the Is(TCP) function?

Options:

A.

It lists all of the TCP port numbers in a TCP stream

B.

It lists all of the packets that have a TCP layer

C.

It lists the contents of the TCP layer

D.

It lists all of the fields associated with the TCP layer

Question 5

Which python regular expression method should be used to match any character in a-z, 0-

Options:

A.

\w

B.

Greedy matching

C.

A custom character set

D.

\w

Question 6

Review the following code. Which of the following would give the results of variable "total"?

Question # 6

Options:

A.

addTogether()

B.

total()

C.

addTogether( 1,2,3)

D.

total (1,2,3)

Question 7

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

Question # 7

Options:

A.

NameError: name 'some_func' is not defined

B.

5

C.

5+10

D.

15

Question 8

What is the output of the following when executed in a Python shell?

Question # 8

Options:

A.

[[1, 2, 2.5], [3, 4], [5, 6]]

B.

[[1,2], [3, 4], [5, 6]]

C.

[[1,2], [3, 4]]

D.

[[1,2,2.5], [3,4]]

Question 9

Which of the following would produce this list?

[65, 66, 67, 68]

Options:

A.

range(l,4) + 64

B.

for x(4)+64

C.

map(ord, "ABCD")

D.

range(4)+ 65

Question 10

After calling a subprocess in a Python program, the program returns an error code of "0". What does this indicate?

Options:

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

Question 11

Examine the code snippet below. What will be the contents of the variable T during the loops first iteration?

Question # 11

Options:

A.

is

B.

1

C.

0

D.

Python

Page: 1 / 8
Total 75 questions