Certified Entry-Level Python Programmer Certification- Demo Questions with explanation

PCEP – Certified Entry-Level Python Programmer certification is a professional credential that measures your ability to accomplish coding tasks related to the essentials of programming in the Python language. A test candidate should demonstrate sufficient knowledge of the universal concepts of computer programming, the syntax and semantics of the Python language as well as the skills in resolving typical implementation challenges with the help of the Python Standard Library.



84.

What will be the result of the following code if the user enters 1 and 0 respectively?








A. The program will cause an error

B. 2

C. 10

D. 1010

Answer: D

Analysis: Because the input() function returns the String type, and the string *int in Python means to repeat the output string, so when the execution reaches the step of pring(2*z), the string becomes 1010. So choose D for this topic

119.

Fill in the gap to complete the code with a proper list method so that the program produces the expected output.

Expected output:






A. b= False

B. b=0 in list

C. b=0 not in list

D. b= list [0]

Answer: B

Analysis: From the question stem, we need to insert the correct code to make print(b) print True. Then we look at the options.
A: b=False. Assign b directly, then the result of print(b) is False
B: b= 0 in list. This line of code means that 0 exists in the list, the list exists in True, and 0=True in Python, then the returned result is True (b= 0 in list = False). This is the correct option.
C: Same as above, this line of code means that 0 does not exist in the list, and the return result is False.
D: b = list[0], the element with subscript 0 in list is False, so b=False, then the result of print(b) is False

120.

Fill in the gap to complete the code so that the program produces the expected output.

Expected output:








Answer: DEL

Analysis: From the question, we need to make print(numbers) report an error NameError. So we need to delete the numbers object.Then we can use the del keyword (del is used to delete objects. In Python, everything is an object, so the del keyword can be used to delete variables, lists, or list fragments, etc.)
So this question should be filled in del

121.

Fill in the gap to complete the code with a proper list method so that the program produces the expected output.

Expected output:








Answer: Reverse

Analysis: This topic requires us to reverse the order of the list,then we need to use the reverse() function.The list.reverse() method has no return value, but it sorts the elements of the list in reverse order. So this question should be filled with reverse

127.

What is the expected output of the following code?






A. The program will cause no error

B. None

C. Hello, world

D. None

Hello, world

Answer: B

Analysis: The steps following return will not be executed and there is no return value, so the execution result of fun() is None.So the answer is B

33 views

About

Launched in 2016 as 591Lab International and locally in China known as “WUQIUYAO Tech. Ltd” we are committed to offering our clients excellent experience on ISACA, PMI, Cisco and Huawei examination preparatory services. We focus strongly on popular exams, and exam preparations services. We provide our customers with the complete training needed to earn the best scores for their respective Management and IT career certifications. We have a huge list of satisfied customers with top grades to back up all the claims we make.

Quick Links

Contact

This material is not sponsored by, endorsed by, or affiliated with Cisco Systems, Inc & Huawei Technologies Co., Ltd. Cisco Certified Internetworking Engineer, the Cisco Systems logo and the CCIE™ logo are trademarks or registered trademarks of Cisco Systems, Inc. in the United States and certain other countries.Huawei Certified Internetwork Expert, the Huawei logo and the HCIE™ logo are trademarks or registered trademarks of Huawei Technologies Co., Ltd . in China and certain other countries All other trademarks are trademarks of their respective owners. 

© Copyright 591Lab 2020. All Rights Reserved.