class ScoreBoard:
    def __init__(self, team_name):
        self.team_name = team_name
        self.score = 0

    def shot(self, point):
        if point == 2:
            self.score += 2
        elif point == 3:
            self.score += 3


board = ScoreBoard("Lakers")

board.shot(2)
board.shot(2)
board.shot(3)

print("팀:", board.team_name)
print("현재 점수:", board.score)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: