Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

question 2 of 10 while setting up a game using a modular program, the p…

Question

question 2 of 10
while setting up a game using a modular program, the programmers want to add a procedure to indicate what should happen when a specific event occurs, such as when a button is pressed. what do they need to do?
a. create an event handler
b. add a function call
c. create a control structure
d. add a function parameter

Explanation:

Brief Explanations

An event handler is a procedure that is executed in response to a specific event, like a button press. A function call is used to execute a function but doesn't directly handle events. A control structure (like loops or conditionals) manages the flow of a program. A function parameter is a value passed to a function. Since the task is to handle an event (button press), an event handler is needed.

Answer:

A. Create an event handler