Free PCAP Python-Institute PCAP Practice Test Question

Loading demo links...

Showing 7–9 of 14 questions

Question 7 (Topic 1)

Which line can be used instead of the comment to cause the snippet to produce the following expected output? (Choose two.) Expected output: 1 2 3 Code:

Select an option, then click Submit answer.

  • c, b, a = b, a, c
  • c, b, a = a, c, b
  • a, b, c = c, a, b
  • a, b, c = a, b, c
Question 8 (Topic 1)

What is the expected output of the following code?

Select an option, then click Submit answer.

  • 2
  • The code will cause a runtime exception
  • 1
  • 3
Question 9 (Topic 1)

What is the expected behavior of the following code? It will:

Select an option, then click Submit answer.

  • print 0
  • cause a runtime exception
  • prints 3
  • print an empty line