MOBILE CSP 4.3 SELF CHECK QUESTIONS

1. Define a procedure named resetScore that sets the global variable score to
100.

2. Using the pre-defined global variables, define a procedure named calculateHitRate that calculates the player’s hit percentage, which is defined as: hitRate = hits / (hits + misses).

3. The updateScore procedure contains a bug. It’s supposed to calculate the hit rate and then display the hit rate in Label1. Find and fix the bug.