212k views
22 votes
Which of these lines of code will increment a variable?

A.
print(variable)

B.
count(variable)

C.
inc(variable)

D.
variable = variable + 1

User InSync
by
4.9k points

2 Answers

4 votes

Answer:

D.

Step-by-step explanation:

I got it right on the test.

User Nala
by
5.3k points
4 votes

Answer:

D

Step-by-step explanation:

User Jujuleder
by
4.6k points