Which of the following sentences correctly describes the output of the below Python code?
A. None of the above.
B. res is the sum of all the number in the list.
C. res is the smallest number in the list.
D. res is the largest number in the list.
E. res is the average of all the number in the list.
Consider the following code.
What would you insert instead of ???, so that the program prints the following pattern to the monitor?
A. -1
B. n
C. str(n)
D. 1
E. 2
What is the expected output of the following code?
A. 6
B. The code is erroneous.
C. 9
D. 3
How many stars will the following snippet send to the console?
A. three
B. two
C. one
You are coding a math utility by using Python. You are writing a function to compute roots. The function must meet the following requirements:
1.
If a is non-negative, return a ** (1 / b)
2.
If a is negative and even, return 'Result is an imaginary number'
3.
If a is negaitve and odd, return -(-a) ** (1 / b)
Which of the following functions meets the requirements?
A. Option A
B. Option B
C. Option C
D. Option D
How many stars will the following snippet print to the monitor?
A. three
B. one
C. two
D. zero
Which one of the lines should you put in the snippet below to match the expected output? Expected output:
Code:
A. break
B. continue
C. exit
D. print()
Consider the following code.
Which of the following code snippets will expand the code, so that 100 will be printed to the monitor? (Choose two.)
A. Option A
B. Option B
C. Option C
D. Option D
The following is a program to validate customer numbers.
The number may only contain numbers and dashes. The number must have the right format (dd-ddd-dddd). What is true about this program?
A. There will be no error but there will be an unwanted result.
B. There will be a SyntaxError.
C. The program works properly.
D. There will be an AttributeError.
What is the expected output of the following code?
marks = [80, 70, 90, 90, 80, 100]
average = sum(marks) // len(marks)
grade = ''
A. A
B. C
C. The code is erroneous.
D. D
E. B
F. F
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Python Institute exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your PCEP-30-02 exam preparations and Python Institute certification application, do not hesitate to visit our Vcedump.com to find your solutions here.