Pass4itsure > GIAC > GIAC Certifications > GPYC > GPYC Online Practice Questions and Answers

GPYC Online Practice Questions and Answers

Questions 4

What does the following line of code do?

A. Sends the data stored in the variable "socket" to the IP address stored in AF_INET

B. Gets data from all network sockets on the system

C. Creates an instance of a UDP socket for transmitting or receiving data

D. Transfers data from the local system to a remote system across the network

Buy Now
Questions 5

What does the "enumerate" function return when applied to a list?

A. An object of tuples, with each assigned to an iterative integer

B. The memory location of the list

C. The total number of items in the list

D. A list containing a single tuple, with the tuple containing all items in the original list

Buy Now
Questions 6

Given that mylist = [1,3,2,1,4,5,3] how do you remove all occurrences of the number 1 from the list in Python?

A. mylist=[x for x in mylist if x! = 1]

B. mylist.remove(l, mylist.count(1))

C. mylist.replace(1,"")

D. mylist. remove(1)

Buy Now
Questions 7

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

Buy Now
Questions 8

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

A. 15

B. 5

C. 10

D. SyntaxError: invalid syntax

Buy Now
Questions 9

Which command produced the following output?

A. >>> dir("help")

B. >>> help(0.1)

C. >>> dir(1)

D. >>>dir([1,2])

Buy Now
Questions 10

Review the following code:

What is the output of this code?

A. blue

B. red blue

C. red blue yellow

D. red

Buy Now
Questions 11

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]

Buy Now
Questions 12

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

>>> print (~100)

A. ~100

B. -101

C. 100

Buy Now
Questions 13

What will the following code in Python 3 result in?

A. outer x, outer x

B. inner x, inner x

C. global x, outer x

D. NameError, outer

E. inner x, outer x

Buy Now
Exam Code: GPYC
Exam Name: GIAC Python Coder (GPYC)
Last Update: May 25, 2026
Questions: 75
10%OFF Coupon Code: SAVE10

PDF (Q&A)

$49.99

VCE

$55.99

PDF + VCE

$65.99