Functions
- Authors: Krishna Kumar Mohbey1, Malika Acharya2
-
View Affiliations Hide AffiliationsAffiliations: 1 Department of Computer Science, Central University of Rajasthan, Rajasthan, India 2 Department of Computer Science, Central University of Rajasthan, Rajasthan, India
- Source: Basics of Python Programming: A Quick Guide for Beginners , pp 61-76
- Publication Date: December 2023
- Language: English
Functions, Page 1 of 1
< Previous page | Next page > /docserver/preview/fulltext/9789815179637/chap4-1.gifFunctions are one of the primary concepts in every programming language. They provide an easy way to package the programming logic and use it as and when required as many times at any place. Thus they help to reduce the redundancy in code and increase the reproducibility. With the increase in the length of code, it is often a good idea to divide the code into separate modules by splitting the code into different functions based on its utility. This is a much- sought practice to organise the lengthy code. They also help in unit testing the code as testing small units in isolation is quite an easy task. This deliberate use of functions thus supports language flexibility and a user-friendly interface. In this chapter the pertinent takeaways would be: 1. Understanding functions and function calls. 2. Comprehending the concept of local and global variables. 3. Programming with the recursive functions.<br>
-
From This Site
/content/books/9789815179637.chap4dcterms_subject,pub_keyword-contentType:Journal105