What will the following statement in Python do? (1)
counter=counter+1
(a) It will print a value as 1.
(b) It will assign a value 1 to counter.
(c) It will increase the value of counter by 1.
(d) It will display the output as ‘counter + 1’.
Answers
Answered by
2
Answer:
It will print a value as 1
Answered by
3
counter = 1
while counter < 11
puts counter
counter = counter + 1
end
My question is that why the line “counter=counter+1“ should be after the line “puts counter“.
while counter < 11
puts counter
counter = counter + 1
end
My question is that why the line “counter=counter+1“ should be after the line “puts counter“.
Similar questions