Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

9) this function chooses the screen to display based on the score. what…

Question

  1. this function chooses the screen to display based on the score. what is the correct way to call this function? function checkwin() { if ( score >= 10 ) { setscreen( \winscreen\ ); } else if ( (score < 0) ) { setscreen( \losescreen\ ); } else { setscreen( \playscreen\ ); } } a. checkwin( ); b. checkwin( ); c. checkwin( );

Explanation:

Brief Explanations

In programming, function names are case - sensitive. The function is defined as checkWin(), so the correct call must match the case exactly. Option A has the wrong case (CheckWin instead of checkWin), Option C also has the wrong case (checkwin instead of checkWin). Option B has the correct case (checkWin).

Answer:

B. checkWin ( ) ;