PCEP - Certified Entry-Level Python Programmer v1.0

Page:    1 / 26   
Exam contains 390 questions

What is the expected output of the following code?

  • A. [7, 3, 23, 42]
  • B. [7, 20, 23, 42]
  • C. [10, 20, 42]
  • D. [10, 20, 23, 42]


Answer : B

Take a look at the snippet and choose one of the following statements which is true:

  • A. vals is longer than nums
  • B. nums and vals are of the same length
  • C. nums is longer than vals


Answer : B

What is the expected output of the following code?

  • A. (1, 2)
  • B. The code is erroneous.
  • C. {'a':1, 'b':2}
  • D. [1,2]


Answer : B

How many elements does the L list contain?

  • A. one
  • B. two
  • C. three
  • D. zero


Answer : D

What is the output of the following snippet?

  • A. 1
  • B. 0
  • C. 6


Answer : B

What is the expected output of the following code?

  • A. ('Peter', 'Peter',)
  • B. PeterPeter
  • C. The code is erroneous.
  • D. ('Peter')
  • E. ()


Answer : E

What is the expected output of the following code?

  • A. The program will cause an error.
  • B. (1, 4, 9)
  • C. ('A', 'D', 'Z')
  • D. (5.0, 7.5, 9.9)


Answer : C

What is the expected output of the following code?

  • A. The code is erroneous.
  • B. 1
  • C. 0
  • D. None


Answer : C

What is the expected output of the following code?

  • A. 22
  • B. 12
  • C. 0
  • D. 11


Answer : B

What is the expected output of the following code?

  • A. (2, 1, 1)
  • B. (1, 1, 1)
  • C. (2, 2, 2)
  • D. The code is erroneous.


Answer : D

Which one of the lines should you put in the snippet below to match the expected output?
Expected output:

Code:

  • A. sorted(list)
  • B. sort(list)
  • C. list.sort()
  • D. list.sorted()


Answer : C

Which of the following sentences are true about the code? (Choose two.)

  • A. nums and vals are different lists
  • B. vals is longer than nums
  • C. nums and vals are different names of the same list
  • D. nums and vals have the same length


Answer : CD

The second assignment:

  • A. extends the list
  • B. doesn't change the list's length
  • C. shortens the list


Answer : B

What is the expected output of the following code?

  • A. efg
  • B. abc
  • C. def
  • D. The code is erroneous.
  • E. abcde
  • F. None of the above.


Answer : A

Which function does in-place reversal of objects in a list?

  • A. list.sort([func])
  • B. list.pop(obj=list[-1])
  • C. list.remove(obj)
  • D. list.reverse()


Answer : D

Page:    1 / 26   
Exam contains 390 questions

Talk to us!


Have any questions or issues ? Please dont hesitate to contact us

Certlibrary.com is owned by MBS Tech Limited: Room 1905 Nam Wo Hong Building, 148 Wing Lok Street, Sheung Wan, Hong Kong. Company registration number: 2310926
Certlibrary doesn't offer Real Microsoft Exam Questions. Certlibrary Materials do not contain actual questions and answers from Cisco's Certification Exams.
CFA Institute does not endorse, promote or warrant the accuracy or quality of Certlibrary. CFA® and Chartered Financial Analyst® are registered trademarks owned by CFA Institute.
Terms & Conditions | Privacy Policy