Summer Special Flat 65% Limited Time Discount offer - Ends in 0d 00h 00m 00s - Coupon code: netdisc

GIAC GPYC GIAC Python Coder (GPYC) Exam Practice Test

Page: 1 / 8
Total 75 questions

GIAC Python Coder (GPYC) Questions and Answers

Testing Engine

  • Product Type: Testing Engine
$43.75  $124.99

PDF Study Guide

  • Product Type: PDF Study Guide
$38.5  $109.99
Question 1

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()

Question 2

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

Options:

A.

SyntaxError: invalid syntax

B.

25

C.

20

D.

15

Question 3

Which command produced the following output?

Options:

A.

>>> dir("help")

B.

>>> help(0.1)

C.

>>> dir(1)

D.

>>>dir([1,2])

Question 4

With a requests session object named "browser", how can the expiration attribute of a cookie named "MUID" from "gpyc.com/" be accessed?

Options:

A.

browser.cookies._cooktes['.gpyc.com/MUID'] .expires

B.

browser.cookies._cookies['.gpyc.com'] ['/'] ['MUID'].expires

C.

browser.cookies._cookies.gpyc.com.MUID.expires

D.

browser.cookies.gpyc.com['MUID']. expires

E.

browser.cookies.gpyc.com.MUID.expires

Question 5

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 6

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

Question 7

Review the following code, written in Python. What are the contents of variable a?

Options:

A.

'cat'/dog'/bird'/violet'

B.

'dandelion', 'rose', 'cat', 'violet', 'bird', 'dog'

C.

'violet'/rose'/dandelion'

D.

'cat'/dog'/bird'

Question 8

Which regular expression will match all date-time stamps for log files of the format shown in the screen capture?

A)

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Question 9

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 10

Which of the lambda definitions of the function some_code is equivalent to the following function definition?

Which of the lambda definitions of the function some_code is equivalent to the following function definition?

Options:

A.

some_code = lambda outvalue:invalue*2

B.

some_code = lambda invalue:outvalue*2

C.

some code = lambda invalue:invalue*2

Question 11

Variable "traffic" contains a Scapy packet list. A programmer runs the following command:

p1=traffic [1]

Which of the following describes the contents of pi, with respect to the "traffic" packet list?

Options:

A.

All Ethernet layer frames

B.

The contents of the second packet

C.

TCP streams with a session ID of 1

D.

The data stored from the first byte onward

Page: 1 / 8
Total 75 questions