Can not find a mistake.
Hello everyone, I need a help, I can not find a mistake (maybe some mistakes). This is text of task: We are working on a game. Our Player class has name and private _lives attributes. The hit() method should decrease the lives of the player by 1. In case the lives equal to 0, it should output "Game Over". Complete the hit() method to make the program work as expected. This is my code: class Player: def __init__(self, name, lives): self.name = name self._lives = lives def hit(self): #ваш код if self._lives > 0: self._lives = self._lives - 1 if self._lives <= 0: print("Game over") #print(self._lives) p = Player("Cyberpunk77", 3) p.hit() p.hit() p.hit()