
Python Institute PCEP - Certified Entry-Level Python Programmer - PCEP-30-02 Exam Questions
QUESTION NO: 1
A set of rules which defines the ways in which words can be coupled in sentences is called:
A set of rules which defines the ways in which words can be coupled in sentences is called:
Correct Answer: A
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 2
Insert the code boxes in the correct positions in order to build a line of code which asks the user for an integer value and assigns it to the depth variable.
(Note: some code boxes will not be used.)

Insert the code boxes in the correct positions in order to build a line of code which asks the user for an integer value and assigns it to the depth variable.
(Note: some code boxes will not be used.)

Correct Answer:

Explanation:

One possible way to insert the code boxes in the correct positions in order to build a line of code which asks the user for an integer value and assigns it to the depth variable is:
depth = int(input("Enter the immersion depth: "))
This line of code uses the input function to prompt the user for a string value, and then uses the int function to convert that string value into an integer number. The result is then assigned to the variable depth.
You can find more information about the input and int functions in Python in the following references:
* [Python input() Function]
* [Python int() Function]
QUESTION NO: 3
What is the expected output of the following code?

What is the expected output of the following code?

Correct Answer: B
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).
QUESTION NO: 4
Insert the code boxes in the correct positions in order to build a line of code which asks the user for a float value and assigns it to the mass variable.
(Note: some code boxes will not be used.)

Insert the code boxes in the correct positions in order to build a line of code which asks the user for a float value and assigns it to the mass variable.
(Note: some code boxes will not be used.)

Correct Answer:

Explanation:

One possible way to insert the code boxes in the correct positions in order to build a line of code that asks the user for a float value and assigns it to the mass variable is:
mass = float(input("Enter the mass: "))
This line of code uses the input function to prompt the user for a string value, and then uses the float function to convert that string value into a floating-point number. The result is then assigned to the variable mass.
You can find more information about the input and float functions in Python in the following references:
* [Python input() Function]
* [Python float() Function]
QUESTION NO: 5
Which of the following functions can be invoked with two arguments?
Which of the following functions can be invoked with two arguments?
Correct Answer: A
Explanation: Only visible for Pass4Test members. You can sign-up / login (it's free).




