H+Procedural+Language+Questions

1. Look at this example of a Python procedure:

(a) What do you think the procedure does? (b) What is the name of the parameter used in this procedure? (c) Why is this a procedure and not a function? (d) In Python we would call this procedure as follows: happyBirthday('Emily') What would be the output of the procedure if the above line of code was executed?

2. Look at this example of a Python function:

(a) What do you think the function does? (b) What are the names of the parameter used in this function? (c) Why is this a function and not a procedure? (d) In Python we would call this function as follows: print(lastFirst('Benjamin', 'Franklin')) What would be the output of the function if the above line of code was executed?

3. What does the following Python function do?

4. This is an example of a C function. What does it do?

5. Look at this C function: (a) What does the function do? (b) What are the names of the function's parameters?