PCAP: Certified Associate in Python Programming

Review 141 PCAP practice questions with answer explanations and community insights.

Question 1

What will be the value of the i variable when the while e loop finishes its execution?

  1. 1
  2. 0
  3. 2
  4. the variable becomes unavailable

Question 2

And operator able to perform bitwise shifts is coded as (Choose two.)

  1. --
  2. ++
  3. <<
  4. >>

Question 3

What will the value of the i variable be when the following loop finishes its execution?

  1. 10
  2. the variable becomes unavailable
  3. 11
  4. 9

Question 4

The following expression - is:

  1. equal to 1
  2. invalid
  3. equal to 2
  4. equal to -1

Question 5

A compiler is a program designed to (Choose two.)

  1. rearrange the source code to make it clearer
  2. check the source code in order to see of it's correct
  3. execute the source code
  4. translate the source code into machine code