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
7.0k points

2 Answers

4 votes

Answer:

D.

Step-by-step explanation:

I got it right on the test.

User Nala
by
7.2k points
4 votes

Answer:

D

Step-by-step explanation:

User Jujuleder
by
7.4k points