Spring Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: pass65

GPYC GIAC Python Coder (GPYC) Questions and Answers

Questions 4

Which of the following will be the value of the variable y?

GPYC Question 4

Options:

A.

7

B.

y has no value. The following error occurred: IndexError: list index out of range

C.

6

D.

y has no value. The following error occurred: KeyError: ' b '

Buy Now
Questions 5

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

Options:

A.

1

B.

0

C.

2

D.

the v ariable becomes unavailable

Buy Now
Questions 6

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

Buy Now
Questions 7

Using the Python " sockets " module, which of the following functions looks up the IP address of www.giac.org ?

Options:

A.

socket.gethostbyaddr( " www.giac.org " )

B.

socket.nslookup.www.giac.org

C.

socket.get( www.giac.org)

D.

socket. gethostbynameC ' www.giac.org " )

Buy Now
Questions 8

What is the cause of the error shown below?

GPYC Question 8

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

Buy Now
Questions 9

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

Buy Now
Questions 10

When using the Python " sockets " module, which of the following calls is used to transmit data to a specific IP address?

Options:

A.

sendto

B.

connect

C.

bind

D.

try

Buy Now
Questions 11

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

Buy Now
Questions 12

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?

Options:

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 13

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

Buy Now
Questions 14

What does the LIMIT function restrict in an SQL SELECT statement?

Options:

A.

The number of queries that can be run against the table per second

B.

The number of records a table is permitted to hold

C.

The number of records that will be returned by a request

D.

The number of subsequent SELECT statements that can be run against the table

Buy Now
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

Buy Now
Questions 16

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

GPYC Question 16

Options:

A.

a

B.

10

C.

-10

D.

-a

Buy Now
Questions 17

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

GPYC Question 17

Options:

A.

SyntaxError: invalid syntax

B.

25

C.

20

D.

15

Buy Now
Questions 18

A connection between a python raw socket server and a netcat client is being made over port 1100 on the same computer. The last command in the Python terminal is:

GPYC Question 18

What needs to be typed in the python terminal to display the input from the netcat session?

Options:

A.

Nothing, as the connection is complete

B.

connection.recv( 1024)

C.

print(remoteip)

D.

Nothing, port 1100 is too low to bind the python server to

Buy Now
Questions 19

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

GPYC Question 19

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

Buy Now
Questions 20

An operator able to perform bitwise shifts is coded as (select two answers)

Options:

A.

- -

B.

++

C.

< <</p>

D.

> >

Buy Now
Questions 21

When the following program " question.py " is executed with Python what is the output?

GPYC Question 21

Options:

A.

10

B.

5

C.

FunctionOverride: function i assigned not called

D.

Function i at 0xb7489764 >

Buy Now
Questions 22

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

Buy Now
Exam Code: GPYC
Exam Name: GIAC Python Coder (GPYC)
Last Update: Apr 30, 2026
Questions: 75

PDF + Testing Engine

$63.52  $181.49

Testing Engine

$50.57  $144.49
buy now GPYC testing engine

PDF (Q&A)

$43.57  $124.49
buy now GPYC pdf