GIAC GPYC - GIAC Python Coder Exam
Page: 2 / 15
Total 73 questions
Question #6 (Topic: Single Topic)
Review the following code, written in Python. What are the contents of variable a?


A. ג€˜catג€™, ג€˜dogג€™, ג€˜birdג€™, ג€˜violetג€™
B. ג€˜dandelionג€™, ג€˜roseג€™, ג€˜catג€™, ג€˜violetג€™, ג€˜birdג€™, ג€˜dogג€™
C. ג€˜violetג€™, ג€˜roseג€™, ג€˜dandelionג€™
D. ג€˜catג€™, ג€˜dogג€™, ג€˜birdג€™
Answer: B
Question #7 (Topic: Single Topic)
When the following program `question.py` is executed with Python what is the output?


A. 10
B. 5
C. FunctionOverride: function i assigned not called
D. <function i at 0xb7489764>
Answer: B
Question #8 (Topic: Single Topic)
What is the output of the following line of code typed into a Python interactive session?
>>> print(bin(0b101010 ^0b111000))
>>> print(bin(0b101010 ^0b111000))
A. 0b10101
B. 18
C. 0b10010
D. 0b101101
Answer: C
Question #9 (Topic: Single Topic)
Which of the following would produce this list?
[65, 66, 67, 68]
[65, 66, 67, 68]
A. range(1,4) + 64
B. for x(4)+64
C. map(ord, ג€ABCDג€)
D. range(4)+ 65
Answer: D
Question #10 (Topic: Single Topic)
What is the output of the ls (TCP) function?
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
Answer: A