LinkedIn Python Skill Assessment Quiz Answers

What is the correct syntax for defining a class called “Game”, if it inherits from a parent class called “LogicGame”?

Latest Update on 25th January, 2022 by Certification Course Answers

What is the correct syntax for defining a class called “Game”, if it inherits from a parent class called “LogicGame”?

  1.  class Game(LogicGame): pass
  2.  def Game(LogicGame): pass
  3.  def Game.LogicGame(): pass
  4.  class Game.LogicGame(): pass

Correct Answer:

  •  class Game(LogicGame): pass

Explanation: The parent class which is inherited is passed as an argument to the child class. Therefore, here the first option is the right answer.

Latest Updates

No posts found in this category.