concept score in category python

This is an excerpt from Manning's book Mastering Large Datasets with Python: Parallelize and Distribute Your Python Code.
Classifying a tweet by assigning scores to words it uses may seem simplistic, but it’s actually not too far from how both academia and industry approach the situation. Lexicon-based methods of classification, which assign words points and then roll those points up into an overall score, achieve remarkable performance given their simplicity. And because they are transparent, they offer the benefit of interpretability to practitioners.
To resolve this problem, we run the PageRank process several times. Each time we do the same thing, but we’ll use the scores from the previous round to inform our ratings. This way, wins over Serena or links from the New York Times become more important in each subsequent round.

This is an excerpt from Manning's book Hello World! Third Edition.
What happened here? In the first line, the Score tag was stuck on the value 7. We made a new thing, which was Score + 1, or 7 + 1. That new thing is 8. Then we took the Score tag off the old thing (7) and stuck it on the new thing (8). So Score has been reassigned from 7 to 8.
A way to keep score and display the score in the window
Oops! We forgot something about namespaces. Remember that big, long explanation in chapter 15? Now you can see a real example of it. Although we do have a variable called score, we’re trying to use it from within the move() method of the Ball class. The class is looking for a local variable called score, which doesn’t exist. Instead, we want to use the global variable we already created, so we need to tell the move() method to use the global score, like this:
def move(self): global scoreWe also need to make score_font (the font object for the score) and score_surf (the surface that contains the rendered text) global as well, because they are updated in the move() method. So the code should actually look like this:
def move(self): global score, score_font, score_surfNow it should work! Try it: you should see the score in the upper-left corner of the window, and the score should increase as you bounce the ball off the top of the window.

This is an excerpt from Manning's book Hello App Inventor!: Android programming for kids and the rest of us.
Think about tic-tac-toe. What do you need the game to look like? Probably a grid with nine spaces (3 x 3). You also need some way of letting the player touch a space in the grid; and then you’ll put an X or an O in that space (as long as it’s still free). You might also want to play some sounds and keep score.
The event handler Seed.CollidedWith automatically produces a variable named other. This means it’s reporting when the seed collides with any component (which could include the hamster). In this case, you want a score to occur when the seed collides with BowlSprite, so you use an if ... then ... do test to check that in this case the score increases only if the seed collides with the component BowlSprite.