Python Institute certification · Exam PCAP-31-03

PCAP-31-03 Mock Exam

Certified Associate in Python Programming

Find out if you're ready for PCAP-31-03. Take the free timed mock exam and get your score in minutes, or study the free PCAP-31-03 questions below with answers and explanations.

20 questions · 33 minutes · free, no sign-up

Free PCAP-31-03 questions

1–10 of 39 free
Question 1 Choose 1
Python strings can be “glued” together using the operator:
Show answerHide answer

Correct answer: D +

Question 2 Choose 1
How many lines does the following snippet output?

Show answerHide answer

Correct answer: A three

Question 3 Choose 1
Assuming that the V variable holds an integer value to 2, which of the following operators should be used instead of OPER to make the expression equal to 1? V OPER 1 -
Show answerHide answer

Correct answer: C >>

Question 4 Choose 1
What can you do if you don’t like a long package path like this one?

Show answerHide answer

Correct answer: D you can make an alias for the name using the as keyword

Question 5 Choose 1
What is the expected behavior of the following code?

Show answerHide answer

Correct answer: B it outputs 2

Question 6 Choose 1
What is the expected output of the following snippet?

Show answerHide answer

Correct answer: C 2

Question 7 Choose 2
If you need a function that does nothing, what would you use instead of XXX? (Select two answers) def idler ( ): XXX
Show answerHide answer

Correct answer: A, D passNone

Question 8 Choose 2
Which of the following statement are true? (Select two answers)
Show answerHide answer

Correct answer: C, D if open ( ) ‘s second argument is ‘r’ the file must exist or open will failif open ( )’s second argument is ‘w’ and the invocation succeeds, the previous file’s content is lost

Question 9 Choose 1
Files with the suffix .pyc contain:
Show answerHide answer

Correct answer: D semi-compiled Python code

Question 10 Choose 1
What is the expected output of the following code if the file named existing_text_file is a non-zero length text file located inside the working directory?



Show answerHide answer

Correct answer: B -1

Full mock exam

Sit the PCAP-31-03 exam before exam day

Full-length mocks with the same number of questions and the same time limit as the real PCAP-31-03 exam. Every attempt draws a new set of questions from the full bank, so you can keep going until you pass comfortably.

Get full PCAP-31-03 mock exam
  • 65questions per mock
  • 105 mintime limit
  • 133questions in the bank
  • Newmock on every attempt