Make a variable
A variable is a name that refers to a value. Line 1, score = 10, makes one. Python works out the right side of = first: 10, a whole number, is stored in memory as an object.
Then = ties the name on its left, score, to that object. Read = as "now refers to", not "equals". From now on, writing score means the value it refers to: 10.
Share and move
Line 2, bonus = score. Python looks up score, finds the object 10, and ties a new name, bonus, to the same object. Nothing is copied: two names now refer to one value.
Line 3, score = score + 5, uses score on both sides. The right side runs first: score refers to 10, so 10 + 5 makes a new object, 15. The object 10 itself never changes.
Now = moves the name score to the new object, 15. bonus still refers to 10: giving one name a new value never changes another name. This is called reassigning a variable.
print(score, bonus) looks up each name and prints the value it refers to, with one space between: 15 10. A name gives its latest value, so the order of the lines matters.
Good names
A name may use letters, digits and underscores (_). It cannot start with a digit, contain a space, or be a keyword such as if or for. Pick names that say what they hold.
Names are case-sensitive: Score and score are different names. Change line 4 to print(Score) and Python stops with a NameError, because no name Score was ever made. It even suggests score.
Try it yourself
;; step 1/8 · line 1: score = 10 score = 10 # right side first: 10 is an int object in memory >>> type(10) <class 'int'>
Python calls every value an object. A variable does not hold its value like a box; it is a name tied to an object, and = changes which object a name is tied to. Whole numbers (int) and strings never change once made, so score + 5 always makes a new object. Two names can share any object, but sharing only shows when an object can change, such as a list.