GIAC GPYC - GIAC Python Coder Exam
Page: 1 / 15
Total 73 questions
Question #1 (Topic: Single Topic)
Which of the following will be the value of the variable y?


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ג€™
Answer: C
Question #2 (Topic: Single Topic)
What are the contents of the variable x when the following is executed in a Python interactive session?


A. ג€˜Soג€™
B. ג€˜So youג€™
C. ג€˜So you want a GIAC Certification?ג€™
D. ג€˜Soג€™, ג€˜youג€™
Answer: C
Question #3 (Topic: Single Topic)
Which of the following commands would correct the error in the screenshot?


A. import itertools
B. modulus itertools
C. return itertools
D. define itertools
Answer: A
Question #4 (Topic: Single Topic)
A user enters unexpected data into program. Which functionality can the programmer use to present an understandable error message to the user?
A. Casting
B. Exception handling
C. Dictionaries
D. Regular expressions
Answer: B
Question #5 (Topic: Single Topic)
A programmer attempts to run the Python program hello.py as follows, but an error occurs. What is the cause of this error?


A. hello.py is missing the line #!usr/bin/python
B. smtp_mime was replaced with Python
C. Python cannot find the script ג€helloג€
D. hello.py is improperly encoded with UTF-16le
Answer: A