Python Institute PCEP - Certified Entry-Level Python Programmer - PCEP-30-02 FREE EXAM DUMPS QUESTIONS & ANSWERS
What is true about exceptions and debugging? (Select two answers.)
Correct Answer: A,C
Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
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.)

(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]
Assuming that the following assignment has been successfully executed:
My_list - [1, 1, 2, 3]
Select the expressions which will not raise any exception.
(Select two expressions.)
My_list - [1, 1, 2, 3]
Select the expressions which will not raise any exception.
(Select two expressions.)
Correct Answer: A,D
Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
What is the expected output of the following code?


Correct Answer: C
Vote an answer
Explanation: Only visible for FreeCram members. You can sign-up / login (it's free).
Arrange the code boxes in the correct positions to form a conditional instruction which guarantees that a certain statement is executed when the temperature variable is equal to 0. 0.


Correct Answer:
if temperature == 0.0:
Explanation:
* if
* temperature
* ==
* 0.0
* :
Arrange the boxes in this order:
This checks if temperature is exactly 0.0, and if so, runs the code inside the if block.
Explanation:
* if
* temperature
* ==
* 0.0
* :
Arrange the boxes in this order:
This checks if temperature is exactly 0.0, and if so, runs the code inside the if block.