The line of code that will increment a variable is:
variable = variable + 1
This code statement adds 1 to the current value of the variable and assigns the updated value back to the same variable.
which of these lines of code will increment a variable?
print(variable)
count(variable)
inc(variable)
variable = variable + 1
1 answer