Evaluate if the following function is a good candidate to be placed in a library. Why or why not?

Answer:
It cannot be a good candidate because the creator of the library is attempting to update the global variables player1Points and player2Points. The updated scores for each player won't be retained unless someone creates the global variables player1Points and player2Points in their program.
The updateScore function is meant to update the point of player1 and player2 ; since the variables player1 and player2 are only defined in the function, then they do not have a global scope. Hence, the function isn't right to be placed in a library.
Variables defined outside a function are called global variables ; hence, they can be referenced anywhere within the program.
Since the function references a global variable, then any program which intends to use the function must have the variables player1 and player2 must be defined globally in the program.
Hence, it is not a good candidate to be placed in a library.
Learn more:https://brainly.com/question/20720413