Linux/Unix shell scripting, Python and Perl Quiz Questions and Answers

Which of the following best describes inheritance?

Answer :
  • Ability of a class to derive members of another class as a part of its own definition

What does built-in function type do in context of classes?

Answer :
  • Determines the class name of any value

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 is called when a function is defined inside a class?

Answer :
  • Method

Which of the following is an invalid statement?

Answer :
  • x y z = 1 2 3

What character is used in python to make a single line comment?

Answer :
  • #

Is Python case sensitive when dealing with identifiers?

Answer :
  • TRUE