giac gpyc practice test

Exam Title: GIAC Python Coder

Last update: Nov 27 ,2025
Question 1

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

  • A. The interpreter will ignore the error and move to the next line
  • B. The application will print a warning to the console and continue to the end
  • C. The computer will "fuzz" input until it finds one that generates no error
  • D. The application will terminate immediately or after resources are exhausted
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 2

Review the following Python 3 code.

  • A. 539
  • B. 4a6e
  • C. (52-4)
  • D. three
Answer:

A

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 3

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

  • A. SyntaxError: invalid syntax
  • B. 25
  • C. 20
  • D. 15
Answer:

C

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 4

After calling a subprocess in a Python program, the program returns an error code of "0". What does
this indicate?

  • A. The subprocess did not run
  • B. The subprocess terminated with no errors
  • C. The subprocess entered an infinite loop condition
  • D. The subprocess encountered a race condition
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 5

What is the output of the following command typed in Python interactive mode?

  • A. SyntaxError: invalid syntax
  • B. True
  • C. False
Answer:

C

vote your answer:
A
B
C
A 0 B 0 C 0
Comments
Question 6

How many lines will the following code print?

  • A. 0
  • B. 1
  • C. 99
  • D. 199
  • E. 2
Answer:

A

vote your answer:
A
B
C
D
E
A 0 B 0 C 0 D 0 E 0
Comments
Question 7

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

  • B. Greedy matching
  • C. A custom character set
  • D. \w
Answer:

D

vote your answer:
B
C
D
B 0 C 0 D 0
Comments
Question 8

What is the output of the following commands typed in the Python Interactive shell?

  • A. Try Else Except Finally
  • B. Try Finally
  • C. Try
  • D. Try Else Finally
Answer:

D

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Question 9

What would be the result of the following code in Python?

  • A. The path of each subkey under Microsoft\Windows NT\CurrentVersion
  • B. A tuple containing the name, value, and type of each subkey under
  • C. Microsoft\Windows NT\CurrentVersion
  • D. The full registry path of the CurrentVersion key
  • E. A handle to the Microsoft\Windows NT\CurrentVersion key
Answer:

B

vote your answer:
A
B
C
D
E
A 0 B 0 C 0 D 0 E 0
Comments
Question 10

Which of the following import statements will add the ability to parse data with regular expressions
to your script?

  • A. from regex import re
  • B. import re
  • C. from re import regex
  • D. import regex
Answer:

B

vote your answer:
A
B
C
D
A 0 B 0 C 0 D 0
Comments
Page 1 out of 7
Viewing questions 1-10 out of 75
Go To
page 2