GPYC

GPYC practice questions, page 3 of 3, with answer review and explanations.

Question 11

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

  1. The interpreter will ignore the error and move to the next line.
  2. The application will print a warning to the console and continue to the end
  3. The computer will ג€fuzzג€ input until it finds one that generates no error
  4. The application will terminate immediately or after resources are exhausted

Question 12

Review the following Python 3 code. Which input would generate the response `Thank You` in the output of this program?

  1. 539
  2. 4a6e
  3. (52-4)
  4. three

Question 13

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

  1. SyntaxError: invalid syntax
  2. 25
  3. 20
  4. 15

Question 14

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

  1. The subprocess did not run
  2. The subprocess terminated with no errors
  3. The subprocess entered an infinite loop condition
  4. The subprocess encountered a race condition