LinkedIn Python Skill Assessment Quiz Answers

What is the correct syntax for calling an instance method on a class named Game?

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

What is the correct syntax for calling an instance method on a class named Game?

(Answer format may vary. Game and roll (or dice_roll) should each be called with no parameters.)

>>> dice = Game()
>>> dice.roll()
>>> dice = Game(self)
>>> dice.roll(self)
>>> dice = Game()
>>> dice.roll(self)
>>> dice = Game(self)
>>> dice.roll()

Correct Answer:

>>> dice = Game()
>>> dice.roll()

Latest Updates

No posts found in this category.