Summer Sale Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: v4s65

PCAP-31-03 Exam Dumps - Certified Associate in Python Programming

Go to page:
Question # 4

What is the expected behavior of the following code?

It will:

A.

print 0

B.

cause a runtime exception

C.

prints 3

D.

print an empty line

Full Access
Question # 5

There is a stream named s open for writing. What option will you select to write a line to the stream''

A.

s.write("Hello\n")

B.

write(s, "Hello")

C.

s.writeln("Hello")

D.

s.writeline("Hello")

Full Access
Question # 6

Which of the following statement are true? (Select two answers)

A.

closing an open file is performed by the closefile ( ) function

B.

the second open ( ) argument describes the open mode and defaults to ‘w’

C.

if open ( ) ‘s second argument is ‘r’ the file must exist or open will fail

D.

if open ( )’s second argument is ‘w’ and the invocation succeeds, the previous file’s content is lost

Full Access
Question # 7

A method for passing the arguments used by the following snippet is called:

A.

sequential

B.

named

C.

positional

D.

keyword

Full Access
Question # 8

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) )

A.

1

B.

0

C.

-1

D.

an exception is raised

Full Access
Go to page: