GoConqr has a new look! Let us know what you think.

Flashcards

Functions

Aparna Dhirde English 18 cards

Cards in this deck (18)

  1. 1FunctionA named sequence of statements that performs some useful operation. Functions may or may not take arguments and may or may not produce a result.
  2. 2Function DefinitionA statement that creates a new function, specifying its name, parameters and the statements it executes.
  3. 3Function ObjectA value created by a Function Definition. The name of the function is a variable that refers to a function object.
  4. 4Function HeaderThe first line of a function definition
  5. 5Function BodyThe sequence of statements inside a function definition.
  6. 6ParameterA name used inside a function to refer to the value passed as an argument.
  7. 7Function CallA statement that executes a function, having function name with argument list.
  8. 8ArgumentA value provided to a function when the function is called. This value is assigned to the corresponding parameter in the function.
  9. 9Local VariableA variable defined inside the function. A local variable can only be used inside its function. Scope of variable is inside function only.
  10. 10Global VariableA Variable defined outside the function. A global variable can be used throughout the program. Scope of variable is in the whole program.
  11. 11Return ValueIt is the result of a function. If a function call is used as an expression, the return value is the value of the expression.
  12. 12ModuleA file that contains a collection of related functions & other definitions.
  13. 13Import statementA statement that reads a module file & creates a module object.
  14. 14Dot notationThe syntax for calling a function in another module by specifying the module name followed by a dot (Period) & the function name.
  15. 15Flow of executionThe order in which statements are executed during a program run.
  16. 16Default ParameterA default value is a value that is predecided and assigned
    to the parameter when the function call does not have
    its corresponding argument.
  17. 17Good Programming PracticeOnly using
    the required function(s)
    rather than importing a
    module saves memory.
  18. 18"""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.

Information

Description
Let us learn fucntions
Created by
Aparna Dhirde
Views
24
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?