PCAP Practice Test

PCAP Practice Test practice questions, page 2 of 6, with answer review and explanations.

Question 6

What is the output of the following piece of code?

  1. ant' bat' camel
  2. antג€batג€ camel
  3. antbatcamel
  4. print (a, b, c, sep= ' ג€ ')

Question 7

What is the expected output of the following snippet?

  1. the code is erroneous
  2. 3
  3. 7
  4. 15

Question 8

How many lines does the following snippet output?

  1. three
  2. one
  3. two
  4. four

Question 9

Which of the following literals reflect the value given as 34.23? (Choose two.)

  1. .3423e2
  2. 3423e-2
  3. .3423e-2
  4. 3423e2

Question 10

What is the expected output of the following snippet?

  1. 3
  2. 1
  3. 2
  4. the code is erroneous