Certified Associate in Python Programming (PCAP) Quiz Questions and Answers

What is the maximum possible length of an identifier?

Answer :
  • 79 characters

Suppose t = (1, 2, 4, 3), which of the following is incorrect?

Answer :
  • t[3] = 45

Which of the following is a Python tuple?

Answer :
  • (1, 2, 3)

Which of the following option is not a core data type in the python language?

Answer :
  • Class

What happens when '2' == 2 is executed?

Answer :
  • False

What does 3 ^ 4 evaluate to?

Answer :
  • 7

What will be the output of the following Python code? t=(1,2,4,3) t[1:-1]

Answer :
  • (2, 4)

If a={5,6,7}, what happens when a.add(5) is executed?

Answer :
  • a={5,6,7}

Which of the following is invalid?

Answer :
  • none of the mentioned

What is the result of round(0.5) - round(-0.5)?

Answer :
  • 0.0