You can print this page for a quick reference guide or you can use the tools below to create printable test sheets
6.1: understand the benefits of using subprograms
|tell the program to actually execute (run) the subprogram
|tells the program how to execute (run) the subprogram
|a section of code with a name that can be re-used. It always returns a value
|a section of code with a name that can be re-used. It can't return a value.
|send data back to the part of the program which called the subprogram
|a section of code with a name that can be re-used (e.g. function or procedure)
6.2: be able to write code that uses user-written and pre-existing (built- in, library) subprograms
|library sub program
|a procedure or function that can be used by importing a module (e.g. random.randint or time.sleep)
|predefined sub program
|a procedure or function that is built into the programming language (e.g. max, min, input or print)
|user defined subprogram
|a procedure or function that the user has written themselves
6.3: understand the concept of passing data into and out of subprograms (procedures, functions)
|make a procedure or function actually run
|type of subprogram which is a section of code with a name that can be re-used. Always returns a value
|a value that is passed to a subprogram by the part of the code which calls the procedure or function
|type of subprogram which is a section of code with a name that can be re-used. Doesn't return a value.
|go back from a procedure or function to the part of the program that called it
|data that is passed back from a procedure or function to the part of the program that called it
6.4: understand the need for, and how to use, global and local variables when implementing subprograms
|a variable which can be accessed from anywhere in a program
|a variable which can only be read / written within a particular part of a program
|the part of a program where a variable can be accessed.
|memory storage location with a name that can store an individual value. The value can change when the program runs.