Functions and Modules

  • T. R. PadmanabhanEmail author


The function as carrying out a set of operations and returning an object is basic to Python. Functions, lambda as the elegant anonymous one-line function, nested functions, and recursive functions are all discussed with illustrations. Local, non-local, and global sift out the scope of entities in nested schemes. A module has functions and stand alone statements within it. A module can be imported into any environment and its functions used contextually. Math is a key built-in module in Python with the exponential, trigonometric, and related functions as its main contents. Use of these from the math module, to suit contexts, is illustrated through examples.


Code Block Function Call Parity Check Function Definition Cube Root 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. Padmanabhan TR (2007) Introduction to microcontrollers and their applications. Alpha science international ltd, OxfordGoogle Scholar
  2. Rossum Gv, Drake FL Jr (2014) The Python library reference. Python software foundationGoogle Scholar
  3. Sullivan M (2008) Algebra & trigonometry, 8th edn. Pearson Prentice hall, New JerseyGoogle Scholar
  4. Zwillinger D (ed) (2003) Standard mathematical tables and formulae. Chapman & Hall/CRC, New YorkGoogle Scholar

Copyright information

© Springer Nature Singapore Pte Ltd. 2016

Authors and Affiliations

  1. 1.Amrita UniversityCoimbatoreIndia

Personalised recommendations