Free PCAP Exam Braindumps

What will be the value of the i variable when the while e loop finishes its execution?

  1. 1
  2. 0
  3. 2
  4. the variable becomes unavailable

Answer(s): A

Explanation:



How many elements will the list1 list contain after execution of the following snippet?

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

Answer(s): A



Executing the following snippet will cause the dct:

  1. to hold two keys named ‘pi’ linked to 3.14 and 3.1415 respectively
  2. to hold two key named ‘pi’ linked to 3.14 and 3.1415
  3. to hold one key named ‘pi’ linked to 3.1415
  4. to hold two keys named ‘pi’ linked to 3.1415

Answer(s): C



Which of the listed actions can be applied to the following tuple? (Select two answers)
tup = ()

  1. tup [:]
  2. tup.append (0)
  3. tup [0]
  4. del tup

Answer(s): C,D


Reference:

https://www.tutorialspoint.com/python/python_tuples.htm



What is the expected output of the following snippet?

  1. *- **-**-**-*
  2. *-**-**-**-**-**-**-**-*
  3. *-*
  4. *-**-*

Answer(s): A

Explanation: