Programming for Network Engineers (PRNE) v2.0 Quiz Questions and Answers

Which of the following is invalid?

Answer :
  • <p>None of the mentioned</p>

Explanation :

All the statements will execute successfully but at the cost of reduced readability.

All keywords in Python are in _________.

Answer :
  • none of the mentioned

Explanation :

True, False and None are capitalized while the others are in lower case.

Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?

Answer :
  • all of the mentioned

Explanation :

Slicing is allowed in lists just as in the case of strings.

What is the maximum possible length of an identifier?

Answer :
  • 79 characters

Explanation :

Identifier can be of any length

Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)?

Answer :
  • error

Explanation :

Execute in the shell and verify