Python Institute certification · Exam PCAP-31-03

PCAP-31-03 Mock Exam Page 4

Certified Associate in Python Programming

Free PCAP-31-03 mock exam questions 31–39, each with the answer and an explanation.

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

Free PCAP-31-03 questions

31–39 of 39 free
Question 31 Choose 1
What is the expected output of the following snippet?

Show answerHide answer

Correct answer: A 3

Explanation

Question 32 Choose 1
What is the expected output of the following code?

Show answerHide answer

Correct answer: D 1

Question 33 Choose 2
Which of the following expressions evaluate to True? (Select two answers)
Show answerHide answer

Correct answer: C, D 'abc' .upper () < 'abc''1' + '2' * 2 !=2 '12'

Question 34 Choose 1
The__bases__property contains:
Show answerHide answer

Correct answer: C base class names (str)

Question 35 Choose 2
Assuming that the snippet below has been executed successfully, which of the following expressions will evaluate to True? (Select two answers)

string = 'python' [::2]
string = string[-1] + string[-2]
Show answerHide answer

Correct answer: B, C string is Nonelen (string] == 3

Question 36 Choose 2
You are going to read 16 bytes from a binary file into a bytearray called data. Which lines would you use? (Select two answers)
Show answerHide answer

Correct answer: A, D data = bytearray (16) bf.readinto (data)data = bytearray (binfile.read (16))

Question 37 Choose 1
How many elements will the list2 list contain after execution of the following snippet?

list1 = [False for i in range (1, 10) ]
list2 = list1 [-1:1:-1]
Show answerHide answer

Correct answer: C seven

Explanation

Question 38 Choose 2
A Python module named pymod, py contains a function named pyfun ( ).
Which of the following snippets will let you invoke the function? (Select two answers)
Show answerHide answer

Correct answer: B, D Import pymod
Pymod. Pyfun ( )
From pymod import pyfun
Pyfun ( )

Question 39 Choose 2
Assuming that the following snippet has been successfully executed, which of the equations are False? (Select two answers)

Show answerHide answer

Correct answer: A, B len(a)== len (b)a [0]-1 ==b [0]

That's the last free question

You've seen the free 30% (39 of 133 questions). Full access unlocks every question and full-length PCAP-31-03 mock exams (65 questions, 105 minutes), a different mock on every attempt.

Unlock full mock exam
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