Limited-Time Offer: Enjoy 50% Savings! Ends in 00h 00m 00s Coupon code: 50OFF
Skip to content

Free GIAC Python Coder GPYC Exam Questions

Page: 1 / 8 Total 75 questions

Want more questions? Get Premium Access.

Question 1

A user enters unexpected data into a program. Which functionality can the programmer use to present an understandable error message to the user?

Correct Answer: B. Exception handling

Question 2

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

Correct Answer: A. socket.SOCK_STREAM; B. socket. AF_NET

Question 3

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?

Correct Answer: A. some_code = lambda outvalue:invalue*2

Question 4

Review the following code.

What is the output?

Correct Answer: C. (256,)

Question 5

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

Correct Answer: B. The application will print a warning to the console and continue to the end

Question 6

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

Correct Answer: C. 20

Question 7

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

Correct Answer: A. NameError: name 'some_func' is not defined

Question 8

How many lines will the following code print?

Correct Answer: A. 0

Question 9

When accessing the hard drive directly, how would the character *B' be stored?

Correct Answer: A. 01000010

Question 10

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

Correct Answer: D. \w