To add ten to the user's current score in most programming languages, you should use the assignment operator to update the value of the variable `score`. The correct line of code from the provided options is:
```plaintext
score = score + 10
```
This line takes the current value of `score`, adds 10 to it, and then assigns the new value back to `score`. The `==` operator is used for comparison and not for assignment, and `score = score + score` would double the score, not add ten. Also, "if score, then +10" is not a proper syntax in any programming language.
If you wanted to create a line of code that would add ten to the user’s current score, which code should you use?
(1 point)
Responses
score == score + 10
score == score + 10
score = score + score
score = score + score
score = score + 10
score = score + 10
if score, then +10
2 answers
The line of code after a line beginning with the word else needs to begin with a(n):
(1 point)
Responses
print statement.
print statement.
indentation.
indentation.
#
#
:
(1 point)
Responses
print statement.
print statement.
indentation.
indentation.
#
#
: