Python Institute Certified Associate in Python Programming PCAP-31-03 Exam Questions

Page: 1 / 14
Total 147 questions
Question 1

Assuming that the code below has been executed successfully, which of the following expressions evaluate to True? (Select two answers)



Answer : A, C


Question 2

Assuming that the code below has been executed successfully, which of the following expressions will always evaluate to True? (Select two answers)

import random

v1 = random. random()

v2 = random. random()



Answer : B, C


Question 3

Which of the following snippets will execute without raising any unhandled exceptions? (Select answers)

A)

B)

C)

D)



Answer : B, C, D


Question 4

If you need a function that does nothing, what would you use instead of XXX? (Select two answers)

def idler ( ):

XXX



Answer : A, D


Question 5

What is the expected output of the following code?

def foo(x,y,z):

return x(y) - x(z)

print{f00(lambda x: x % 2, 2, 1) )



Answer : C


Question 6

What is the expected output of the following snippet?



Answer : A


Question 7

What is the expected out of the following code of the file named zero_length_existing_file is a zero-length file located inside the working directory?



Answer : A


Page:    1 / 14   
Total 147 questions