|
|
Created by Aparna Dhirde
almost 6 years ago
|
|
| Question | Answer |
| Function | A named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result. |
| Function Definition | A statement that creates a new function, specifying its name, parameters and the statements it executes. |
| Function Object | A value created by a Function Definition. The name of the function is a variable that refers to a function object. |
| Function Header | The first line of a function definition |
| Function Body | The sequence of statements inside a function definition. |
| Parameter | A name used inside a function to refer to the value passed as an argument. |
| Function Call | A statement that executes a function, having function name with argument list. |
| Argument | A value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function. |
| Local Variable | A variable defined inside the function. A local variable can only be used inside its function. Scope of variable is inside function only. |
| Global Variable | A Variable defined outside the function. A global variable can be used throughout the program. Scope of variable is in the whole program. |
| Return Value | It is the result of a function. If a function call is used as an expression, the return value is the value of the expression. |
| Module | A file that contains a collection of related functions & other definitions. |
| Import statement | A statement that reads a module file & creates a module object. |
| Dot notation | The syntax for calling a function in another module by specifying the module name followed by a dot (Period) & the function name. |
| Flow of execution | The order in which statements are executed during a program run. |
| Default Parameter | A default value is a value that is predecided and assigned to the parameter when the function call does not have its corresponding argument. |
| Good Programming Practice | Only using the required function(s) rather than importing a module saves memory. |
| """Docstrings""" | It is also called Python documentation strings. It is a multiline comment that is added to describe the modules, functions, etc. They are typically added as the first line, using 3 double quotes. |
Want to create your own Flashcards for free with GoConqr? Learn more.