2.4.5 Declare and call functions and procedures Flashcards

1
Q

Define:

Function

A

Code written to perform a specific task and can be used more than once

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Define:

Built-in Functions

A

Functions included in the programming language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define:

User-defined functions (UDFs)

A

Functions that can be created by software developers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Define:

Anonymous Function

A

Also known as lambda functions, functions not declared with the standard keyword (‘def’ in Python)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Define:

Method

A

A function that is part of a class and is accessed using an instance or object of a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define:

Arguments

A

Value that is sent to a function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Define:

Parameter

A

Variable that is listed inside the parentheses of a function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

State:

2 requirements of a procedure

A
  • Name
  • Programming code to perform required task (code block)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

State:

Difference between Procedure & Function

A

Function: Returns a value and control, compiled before and re-compiled if needed - with different parameter values
Procedure: Returns the control but no value, only compiled once - no values will change, a paramater value once accepted once cannot change

How well did you know this?
1
Not at all
2
3
4
5
Perfectly