Changing a Variable

Lab Python Beginner 10 points

Set score = 10, print it, then increase it by 5 using += and print it again.

Input

None.

Output

10 then 15.

Example

Output

10
15
Sample output available
Editor
Python

Hints

score += 5 is short for score = score + 5.

Solution explanation

Variables can be reassigned. Augmented operators like +=, -=, *= update a variable in place.

Show solution
score = 10
print(score)
score += 5
print(score)
Output
Answer
HOME LEARN COMMUNITY DASHBOARD