Help me make a parameter!

Im in the process of making a quiz app, and i need to implement a parameter into this procedure right here! but im at a dead end, can anyone help me out


Start from here: a parameter in a procedure only makes sense if you're planning on using that value to change something or returning a modified version of that variable.

Here is a recent example of a value procedure (function):

Value procedures are my favorite kind of procedures, because you can connect their calls together like plumbers connect plumbing fittings and water pipes (except we use data instead of water.)

Here are some value procedures to consider for your quiz project:

returns what the answer should be for a given question text, hiding the lookup table work from the caller

returns how many points(+) would be added or subtracted (-) from total score if that question was answered with 'answer').

compliment (points):
What compliment ('Correct!', 'Wrong',...) to display after scoring the given number of points.
(This should be the easiest one.)

While these words may be of little value to you, they may be of use to future people who need explanations of procedures. Deleting the others' posts would waste their efforts.

1 Like

(post deleted by author)