asked 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

asked
User InSync
by
7.8k points

2 Answers

4 votes

Answer:

D.

Step-by-step explanation:

I got it right on the test.

answered
User Nala
by
7.9k points
4 votes

Answer:

D

Step-by-step explanation:

answered
User Jujuleder
by
8.3k points