© Sandeep Nagar 2018
Sandeep NagarIntroduction to Python for Engineers and Scientistshttps://doi.org/10.1007/978-1-4842-3204-0_8

8. Functions and Loops

Sandeep Nagar
(1)
New York, USA
 

8.1 Introduction

A function is a part of a computer program where a number of programming statements is clubbed as a block. It can be called when desired. This enables a modular approach to programming tasks and has become very popular among programmers nowadays since modules can be edited with ease. Functions receive input parameters and return output parameters . When a function is being used, the function name is called along with values for input parameters. After execution, a set of output parameters is returned. Python functions can be defined at any place in ...

Get Introduction to Python for Engineers and Scientists: Open Source Solutions for Numerical Computation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.