GIAC Python Coder (GPYC) (GPYC) Free Practice Test
Question 1
What does executing the following code in Python 3 result in?
'\x0066'
'\x0066'
Correct Answer: C
Question 2
A log file is stored in variable "a". The file has the following format for each log entry, in order, stored in big endian:
Field 1: 2-byte integer
Field 2: 2-byte integer
Field 3: 4-byte string
Which of the following would unpack a line from the log file into the proper fields?
Field 1: 2-byte integer
Field 2: 2-byte integer
Field 3: 4-byte string
Which of the following would unpack a line from the log file into the proper fields?
Correct Answer: C
Question 3
Examine the code snippet below. What will be the contents of the variable T during the loops first iteration?


Correct Answer: C
Question 4
Which of the following commands would correct the error in the screenshot?


Correct Answer: C
Question 5
Review the following code:

What is the output of this code?

What is the output of this code?
Correct Answer: A
Question 6
What does the following command do?
pip search syslog
pip search syslog
Correct Answer: A
Question 7
Which of the following is the final output when program.py is executed with a Python Interpreter?


Correct Answer: D
Question 8
What is the output of the following line of code typed into a Python interactive session?


Correct Answer: B