6.6.1: be able to write programs that use pre-existing (built-in, library) and user-devised subprograms (procedures, functions)
Keyword | Definition |
---|---|
built-in subprogram | a type of pre-existing subprogram which you can use in python without having to import any modules or defining it yourself (e.g. input / print) |
function | a type of subprogram which can have parameters by always returns a value |
library subprogram | a type of pre-existing subprogram which you can use in python if you import a module (e.g. random or turtle) |
pre-existing subprogram | a subprogram which you can use with python without having to define it yourself (e.g. built-in or library subprogram) |
procedure | a type of subprogram which can have parameters but never returns a value |
subprogram | either a procedure or function (a named section of code that can be called multiple times) |
user-devised subprogram | a type of subprogram which you have defined in your own python code using def |