The Key Point:
The function fun() is defined but never called in the code.
Since fun() is not called, the assignment v = 2 inside fun() never happens.
Therefore, the global variable v stays at its initial value of 1.
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
akumo
1 month ago