Free PCAP-31-03 Exam Braindumps (page: 13)

Page 13 of 37

What is the expected output of the following code if there is no file named non existing_file inside the working directory?

  1. 2 2
  2. 1 3
  3. 1 2 3
  4. 2 2 3

Answer(s): B



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

  1. closing an open file is performed by the closefile ( ) function
  2. the second open ( ) argument describes the open mode and defaults to `w'
  3. if open ( ) `s second argument is `r' the file must exist or open will fail
  4. if open ( )'s second argument is `w' and the invocation succeeds, the previous file's content is lost

Answer(s): C,D



What is the expected output of the following code?

  1. 3
  2. 5
  3. 4
  4. an exception is raised

Answer(s): A



Which of the following lambda definitions are correct? (Select two answers)

  1. lanbda x, y; return x\\y - x%y
  2. lambda x, y: x//y - x%y
  3. lambda (x, y = x\\y x%y
  4. lambda x, y: (x, y)

Answer(s): B,D



Page 13 of 37



Post your Comments and Discuss Python Institute PCAP-31-03 exam with other Community members:

Mohammed commented on November 15, 2024
After checking these questions and reviewing all the answers and Explanations I realized that I would not have been able to pass the exam based on my current knowledge. This is completely changed my approach in how I am going to prepare now.
UNITED STATES
upvote

Nigel commented on September 27, 2024
Managed to pass my exam bu using the full version of this exam. This free version has less questions compared to PDF.
Spain
upvote

Idris Abraham Idilli commented on September 23, 2024
Very interesting
Anonymous
upvote