Variables and values

Add 4 to the starting number and print the result. Try replacing the starting value for each case.

Examples

Example 1

Input
2
Expected output
6

Example 2

Input
0
Expected output
4

Starting point

steps = 2
# Update steps, then print it.

Hints and solution

Hint 1

Assignment reads the current value on the right before changing the name on the left.

Reveal worked answer

Use steps = steps + 4 and then print(steps). A starting value of 2 becomes 6 and zero becomes 4.

steps = 2
steps = steps + 4
print(steps)
Back to the lesson