Free PCEP-30-02 Exam Braindumps (page: 44)

Page 43 of 99

What is the expected behavior of the following program?

  1. The program will generate an error message on the screen
  2. The program will output "Goodbye!"
  3. The program will output Goodbye!
  4. The program will output ("Goodbye!")

Answer(s): A



You have the following file.


You run the file by executing the following command in the terminal. python index.py 42 3
What is the expected output?

  1. 45
  2. 424242
  3. 423
  4. 126
  5. The code is erroneous.

Answer(s): C



You create a function to calculate the power of a number by using Python. You need to ensure that the function is documented with comments. You create the following code. Line numbers are included for reference only.

Which of the following statements are true? (Choose two.)

  1. The string in Line 06 will be interpreted as a comment.
  2. The pond sign (#) is optional for lines 02 and 03.
  3. Line 07 contains an inline comment.
  4. Lines 01 through 04 will be ignored for syntax checking.

Answer(s): C,D



The print() function can output values of:

  1. any number of arguments (including zero)
  2. any number of arguments (excluding zero)
  3. not more than five arguments
  4. just one argument

Answer(s): A






Post your Comments and Discuss Python Institute PCEP-30-02 exam with other Community members:

PCEP-30-02 Exam Discussions & Posts