Advance Python for Machine Learning 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

Which of the following is a Python tuple?

Answer :
  • (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

Which of these in not a core data type?

Answer :
  • class

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

Answer :
  •  Determines class description of any built-in type

Suppose B is a subclass of A, to invoke the __init__ method in A from B, what is the line of code you should write?

Answer :
  • A.__init__(self)

Which of the following is the use of Id() function?

Answer :
  • id returns the identity of the object