GPYC

Review 73 GPYC practice questions with answer explanations and community insights.

Question 1

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

  1. 7
  2. y has no value. The following error occurred: IndexError: list index out of range
  3. 6
  4. y has no value. The following error occurred: KeyError: 'b'

Question 2

What are the contents of the variable x when the following is executed in a Python interactive session?

  1. 'So'
  2. 'So you'
  3. 'So you want a GIAC Certification?'
  4. 'So', 'you'

Question 3

Which of the following commands would correct the error in the screenshot?

  1. import itertools
  2. modulus itertools
  3. return itertools
  4. define itertools

Question 4

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

  1. Casting
  2. Exception handling
  3. Dictionaries
  4. Regular expressions

Question 5

A programmer attempts to run the Python program hello.py as follows, but an error occurs. What is the cause of this error?

  1. hello.py is missing the line #!usr/bin/python
  2. smtp_mime was replaced with Python
  3. Python cannot find the script ג€helloג€
  4. hello.py is improperly encoded with UTF-16le
We are moving to a new platform

CertificationTest is being migrated. Some pages may be slow or briefly unavailable; everything will be back to normal within a few hours. If you run into any issue, email support@certificationtest.net.