nerdexam
Python_Institute

PCEP-30-02 · Question #30

PCEP-30-02 Question #30: Real Exam Question with Answer & Explanation

Sign in or unlock PCEP-30-02 to reveal the answer and full explanation for question #30. The question stem and answer options stay visible for context.

Question

What snippet would you insert in the line indicated below to print. The highest number is 10 and the lowest number is 1. to the monitor?
data = [10, 2, 1, 7, 5, 6, 4, 3, 9, 8]
# insert your code here
print(
 'The highest number is {} ' +
 'and the lowest number is {}'.format(high, low)
)

Options

  • ANone of the above.
  • Bdef find_high_low(nums): nums.sort() return nums[0], nums[-1] high, low = find_high_low(data)
  • Cdef find_high_low(nums): nums.sort() return nums[len(nums)], nums[0] high, low = find_high_low(data)
  • Ddef find_high_low(nums): nums.sort() return nums[-1], nums[0] high, low = find_high_low(data)

Unlock PCEP-30-02 to see the answer

You've previewed enough free PCEP-30-02 questions. Unlock PCEP-30-02 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full PCEP-30-02 Practice